diff options
| author | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-17 19:19:20 +0100 |
|---|---|---|
| committer | Yehonal <yehonal.azeroth@gmail.com> | 2018-12-17 21:01:20 +0100 |
| commit | 4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a (patch) | |
| tree | 3e671c486e329d2b67312cf7c6a4d81bff5c07ed | |
| parent | 2e2c8eefe545b70e0d7c5f1286477a083aff1f06 (diff) | |
| download | wiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.tar.gz wiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.tar.bz2 wiki-4e1a3540b9e9bcf8c95e2d61e674c7b9711dd99a.zip | |
v2.1.0 with blog feature implemented
34 files changed, 167 insertions, 71 deletions
@@ -1,5 +1,6 @@ --- permalink: /404.html +layout: "null" --- <!-- redirect to page creator if not exists --> diff --git a/_config.yml.dist b/_config.yml.dist index 1d11648..bbea686 100644 --- a/_config.yml.dist +++ b/_config.yml.dist @@ -2,6 +2,16 @@ title:
# (string) Description of your wiki
description:
+# (boolean) Enable/disable wiki page list in sidebar
+show_wiki_pages: true
+# (integer) Maximum number of wiki page to shown in sidebar
+show_wiki_pages_limit: 10
+# (boolean) Enable/disable blog feature
+blog_feature: true
+# (boolean) Enable/disable wiki posts list in sidebar (needs blog_feature enabled)
+show_wiki_posts: true
+# (integer) Maximum number of wiki posts to shown in sidebar
+show_wiki_posts_limit: 10
# (boolean) Enable/disable download buttons in sidebar
show_downloads: true
# (string) Specify branch rendered by gitpages allowing wiki tool buttons to work
@@ -89,3 +99,8 @@ inc_before_tail : inc_after_tail :
inc_before_tools :
inc_after_tools :
+
+inc_before_page_list :
+inc_after_page_list :
+inc_before_post_list :
+inc_after_post_list :
diff --git a/_includes/gw_header/downloads.html b/_includes/git-wiki/components/action_btn/downloads.html index 8f654f9..8f654f9 100644 --- a/_includes/gw_header/downloads.html +++ b/_includes/git-wiki/components/action_btn/downloads.html diff --git a/_includes/gw_tools/page_actions.html b/_includes/git-wiki/components/action_btn/page_actions.html index 40cbb92..af5a41f 100644 --- a/_includes/gw_tools/page_actions.html +++ b/_includes/git-wiki/components/action_btn/page_actions.html @@ -1,4 +1,3 @@ -{{page.relative_path}} {% if site.use_github_wiki %} <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/wiki/_new">Add new</a></span> <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/wiki/{{url | remove: '.html' | append: ''}}/_edit">Edit</a></span> @@ -7,10 +6,18 @@ {% else %} <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch}}?filename={{ site.wiki_folder | default: 'wiki' }}/">Add new</a></span> <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/edit/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit</a></span> -{% if site.use_prose_io %} -<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/new/{{site.git_branch}}/{{ site.wiki_folder | default: 'wiki' }}">Add with Prose.io</a></span> -<span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/edit/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit with Prose.io</a></span> -{% endif %} <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/commits/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">History</a></span> <span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/blob/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Source</a></span> +{% if site.blog_feature %} +<span class="tools-element"><a target="_blank" href="{{ site.github.repository_url }}/new/{{site.git_branch}}?filename=_posts/">Add new post</a></span> +{% endif %} + {% if site.use_prose_io %} + <br> + Prose.io: + <span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/new/{{site.git_branch}}/{{ site.wiki_folder | default: 'wiki' }}">Add new</a></span> + <span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/edit/{{site.git_branch}}{{page.folder}}{{url | remove: '.html' | append: '.md'}}">Edit</a></span> + {% if site.blog_feature %} + <span class="tools-element"><a target="_blank" href="http://prose.io/#{{site.github.repository_nwo}}/new/{{site.git_branch}}/_posts/">Add new post</a></span> + {% endif %} + {% endif %} {% endif %}
\ No newline at end of file diff --git a/_includes/git-wiki/components/copyrights/copyrights.html b/_includes/git-wiki/components/copyrights/copyrights.html new file mode 100644 index 0000000..d53ff75 --- /dev/null +++ b/_includes/git-wiki/components/copyrights/copyrights.html @@ -0,0 +1,9 @@ +{% if site.github.is_project_page %} +<p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p> +{% endif %} +<p><small>Hosted on GitHub Pages — Powered by <a href="https://github.com/Drassil/git-wiki">Git-Wiki v{{ + version }}</a> </p> + +{% if site.github.is_project_page %} +<p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p> +{% endif %}
\ No newline at end of file diff --git a/_includes/git-wiki/components/lists/page-list.html b/_includes/git-wiki/components/lists/page-list.html new file mode 100644 index 0000000..8c32b63 --- /dev/null +++ b/_includes/git-wiki/components/lists/page-list.html @@ -0,0 +1,26 @@ +{% if site.inc_before_page_list %} +{% include {{ site.inc_before_page_list }} %} +{% endif %} + +<span class="page-list-title">Pages {% if (site.show_wiki_pages_limit >= 1 %} (Latest {{site.show_wiki_pages_limit }} updated) {% endif %}:</span> +<ul class="page-list"> +{% assign numPages=0 %} +{% assign items = site.pages | sort: 'date' %} +{% for post in items %} +{% if numPages >= site.show_wiki_pages_limit %} + {% break %} +{% endif %} + +{% if post.layout != "null" and post.sitemap != false and post.title %} + <li class="page-list-item"> + <a href="{{ post.url | relative_url }}">{{ post.title}}</a> + </li> + {% assign numPages = numPages | plus: 1 %} +{% endif %} + +{% endfor %} +</ul> + +{% if site.inc_after_page_list %} +{% include {{ site.inc_after_page_list }} %} +{% endif %}
\ No newline at end of file diff --git a/_includes/git-wiki/components/lists/post-list.html b/_includes/git-wiki/components/lists/post-list.html new file mode 100644 index 0000000..5e39359 --- /dev/null +++ b/_includes/git-wiki/components/lists/post-list.html @@ -0,0 +1,26 @@ +{% if site.inc_before_post_list %} +{% include {{ site.inc_before_post_list }} %} +{% endif %} + +<span class="post-list-title">Posts {% if (site.show_wiki_post_limit >= 1 %} (Latest {{site.show_wiki_post_limit }} updated) {% endif %}:</span> +<ul class="post-list"> +{% assign numPages=0 %} +{% assign items = site.posts | sort: 'date' %} +{% for post in items %} +{% if numPages >= site.show_wiki_post_limit %} + {% break %} +{% endif %} + +{% if post.layout != "null" and post.sitemap != false and post.title %} + <li class="post-list-item"> + <a href="{{ post.url | relative_url }}">{{ post.title}}</a> + </li> + {% assign numPages = numPages | plus: 1 %} +{% endif %} + +{% endfor %} +</ul> + +{% if site.inc_after_post_list %} +{% include {{ site.inc_after_post_list }} %} +{% endif %}
\ No newline at end of file diff --git a/_includes/gw_header/logo.html b/_includes/git-wiki/components/logo/logo.html index a4a36c3..a4a36c3 100644 --- a/_includes/gw_header/logo.html +++ b/_includes/git-wiki/components/logo/logo.html diff --git a/_includes/git-wiki/components/search/index.html b/_includes/git-wiki/components/search/index.html new file mode 100644 index 0000000..8af31e8 --- /dev/null +++ b/_includes/git-wiki/components/search/index.html @@ -0,0 +1,7 @@ +{% comment %} + This component just select your preferred search engine based on _config.yml value +{% endcomment %} + +{% assign se = site.search_engine | default: "github" %} +{% assign file = "git-wiki/components/search/se_" | append: se | append: ".html" %} +{% include {{file}} %}
\ No newline at end of file diff --git a/_includes/gw_tools/search_github.html b/_includes/git-wiki/components/search/se_github.html index efcc5e8..efcc5e8 100644 --- a/_includes/gw_tools/search_github.html +++ b/_includes/git-wiki/components/search/se_github.html diff --git a/_includes/gw_tools/search_google.html b/_includes/git-wiki/components/search/se_google.html index 0c3e675..0c3e675 100644 --- a/_includes/gw_tools/search_google.html +++ b/_includes/git-wiki/components/search/se_google.html diff --git a/_includes/gw_tools/search_js.html b/_includes/git-wiki/components/search/se_js.html index 9e75464..9e75464 100644 --- a/_includes/gw_tools/search_js.html +++ b/_includes/git-wiki/components/search/se_js.html diff --git a/_includes/gw_defines/defines.html b/_includes/git-wiki/defines/defines.html index 43aea6d..43aea6d 100644 --- a/_includes/gw_defines/defines.html +++ b/_includes/git-wiki/defines/defines.html diff --git a/_includes/git-wiki/sections/content/body.html b/_includes/git-wiki/sections/content/body.html new file mode 100644 index 0000000..419eeaf --- /dev/null +++ b/_includes/git-wiki/sections/content/body.html @@ -0,0 +1,5 @@ +<body> + {% include git-wiki/sections/content/wrapper.html %} + + {% include git-wiki/sections/tail/tail.html %} +</body>
\ No newline at end of file diff --git a/_includes/gw_content/content.html b/_includes/git-wiki/sections/content/content.html index 347f69d..b86a729 100644 --- a/_includes/gw_content/content.html +++ b/_includes/git-wiki/sections/content/content.html @@ -1,5 +1,5 @@ <section> - {% include gw_tools/tools.html %} + {% include git-wiki/sections/tools/tools.html %} {% if site.inc_before_toc %} {% include {{ site.inc_before_toc }} %} diff --git a/_includes/git-wiki/sections/content/wrapper.html b/_includes/git-wiki/sections/content/wrapper.html new file mode 100644 index 0000000..eab823f --- /dev/null +++ b/_includes/git-wiki/sections/content/wrapper.html @@ -0,0 +1,5 @@ +<div class="wrapper"> + {% include git-wiki/sections/header/header.html %} + {% include git-wiki/sections/content/content.html %} + {% include git-wiki/sections/footer/footer.html %} +</div>
\ No newline at end of file diff --git a/_includes/git-wiki/sections/footer/footer.html b/_includes/git-wiki/sections/footer/footer.html new file mode 100644 index 0000000..f49703b --- /dev/null +++ b/_includes/git-wiki/sections/footer/footer.html @@ -0,0 +1,11 @@ +<footer> + {% if site.inc_before_footer %} + {% include {{ site.inc_before_footer }} %} + {% endif %} + + {% include git-wiki/components/copyrights/copyrights.html %} + + {% if site.inc_after_footer %} + {% include {{ site.inc_after_footer }} %} + {% endif %} +</footer>
\ No newline at end of file diff --git a/_includes/gw_head/head.html b/_includes/git-wiki/sections/head/head.html index cf82bd9..dab9a86 100644 --- a/_includes/gw_head/head.html +++ b/_includes/git-wiki/sections/head/head.html @@ -3,9 +3,9 @@ {% include {{ site.inc_before_head }} %} {% endif %} - {% include gw_head/meta.html %} - {% include gw_head/scripts.html %} - {% include gw_head/styles.html %} + {% include git-wiki/sections/head/meta.html %} + {% include git-wiki/sections/head/scripts.html %} + {% include git-wiki/sections/head/styles.html %} {% if site.inc_after_head %} {% include {{ site.inc_after_head }} %} diff --git a/_includes/gw_head/meta.html b/_includes/git-wiki/sections/head/meta.html index bfae3da..bfae3da 100644 --- a/_includes/gw_head/meta.html +++ b/_includes/git-wiki/sections/head/meta.html diff --git a/_includes/gw_head/scripts.html b/_includes/git-wiki/sections/head/scripts.html index 65ee4ff..65ee4ff 100644 --- a/_includes/gw_head/scripts.html +++ b/_includes/git-wiki/sections/head/scripts.html diff --git a/_includes/gw_head/styles.html b/_includes/git-wiki/sections/head/styles.html index 3bb7ecc..3bb7ecc 100644 --- a/_includes/gw_head/styles.html +++ b/_includes/git-wiki/sections/head/styles.html diff --git a/_includes/gw_header/header.html b/_includes/git-wiki/sections/header/header.html index b89abf9..34f21dd 100644 --- a/_includes/gw_header/header.html +++ b/_includes/git-wiki/sections/header/header.html @@ -4,7 +4,7 @@ {% endif %} {% if site.logo_url %} - {% include gw_header/logo.html %} + {% include git-wiki/components/logo/logo.html %} {% endif %} {% if site.github.is_user_page %} @@ -12,7 +12,15 @@ {% endif %} {% if site.show_downloads %} - {% include gw_header/downloads.html %} + {% include git-wiki/components/action_btn/downloads.html %} + {% endif %} + + {% if site.show_wiki_pages %} + {% include git-wiki/components/lists/page-list.html %} + {% endif %} + + {% if site.blog_feature and site.show_wiki_posts %} + {% include git-wiki/components/lists/post-list.html %} {% endif %} {% if site.inc_after_header %} diff --git a/_includes/gw_tail/tail.html b/_includes/git-wiki/sections/tail/tail.html index e86191c..e86191c 100644 --- a/_includes/gw_tail/tail.html +++ b/_includes/git-wiki/sections/tail/tail.html diff --git a/_includes/gw_tools/tools.html b/_includes/git-wiki/sections/tools/tools.html index c0b50f7..0b2770e 100644 --- a/_includes/gw_tools/tools.html +++ b/_includes/git-wiki/sections/tools/tools.html @@ -3,9 +3,9 @@ {% include {{ site.inc_before_tools }} %} {% endif %} - {% include gw_tools/page_actions.html %} + {% include git-wiki/components/action_btn/page_actions.html %} - {% include gw_tools/search_module.html %} + {% include git-wiki/components/search/index.html %} {% if site.inc_after_tools %} {% include {{ site.inc_after_tools }} %} diff --git a/_includes/gw_content/body.html b/_includes/gw_content/body.html deleted file mode 100644 index 5edfa9b..0000000 --- a/_includes/gw_content/body.html +++ /dev/null @@ -1,5 +0,0 @@ -<body> - {% include gw_content/wrapper.html %} - - {% include gw_tail/tail.html %} -</body>
\ No newline at end of file diff --git a/_includes/gw_content/wrapper.html b/_includes/gw_content/wrapper.html deleted file mode 100644 index 9fb0223..0000000 --- a/_includes/gw_content/wrapper.html +++ /dev/null @@ -1,5 +0,0 @@ -<div class="wrapper"> - {% include gw_header/header.html %} - {% include gw_content/content.html %} - {% include gw_footer/footer.html %} -</div>
\ No newline at end of file diff --git a/_includes/gw_footer/footer.html b/_includes/gw_footer/footer.html deleted file mode 100644 index 7aed17c..0000000 --- a/_includes/gw_footer/footer.html +++ /dev/null @@ -1,19 +0,0 @@ -<footer> - {% if site.inc_before_footer %} - {% include {{ site.inc_before_footer }} %} - {% endif %} - - {% if site.github.is_project_page %} - <p>This project is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a></p> - {% endif %} - <p><small>Hosted on GitHub Pages — Powered by <a href="https://github.com/Drassil/git-wiki">Git-Wiki v{{ - version }}</a> </p> - - {% if site.github.is_project_page %} - <p class="view"><a href="{{ site.github.repository_url }}">View the Project on GitHub <small>{{ github_name }}</small></a></p> - {% endif %} - - {% if site.inc_after_footer %} - {% include {{ site.inc_after_footer }} %} - {% endif %} -</footer>
\ No newline at end of file diff --git a/_includes/gw_tools/search_module.html b/_includes/gw_tools/search_module.html deleted file mode 100644 index 7664e19..0000000 --- a/_includes/gw_tools/search_module.html +++ /dev/null @@ -1,3 +0,0 @@ -{% assign se = site.search_engine | default: "github" %} -{% assign file = "gw_tools/search_" | append: se | append: ".html" %} -{% include {{file}} %}
\ No newline at end of file diff --git a/_layouts/git-wiki-bs-lux.html b/_layouts/git-wiki-bs-lux.html index 6d40fb7..a644058 100644 --- a/_layouts/git-wiki-bs-lux.html +++ b/_layouts/git-wiki-bs-lux.html @@ -1,7 +1,10 @@ -<!-- - This layout uses bootstrap with lux theme ---> -{% include gw_defines/defines.html %} +{% comment %} +# +# This layout uses bootstrap with lux theme +# +{% endcomment %} + +{% include git-wiki/defines/defines.html %} <!doctype html> <html> @@ -11,9 +14,9 @@ {% include {{ site.inc_before_head }} %} {% endif %} - {% include gw_head/meta.html %} - {% include gw_head/scripts.html %} - {% include gw_head/styles.html %} + {% include git-wiki/sections/head/meta.html %} + {% include git-wiki/sections/head/scripts.html %} + {% include git-wiki/sections/head/styles.html %} <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.3/lux/bootstrap.min.css"> @@ -26,10 +29,10 @@ <div class="wrapper"> <div class="row"> <div class="col-lg-3"> - {% include gw_header/header.html %} + {% include git-wiki/sections/header/header.html %} </div> <div class="col-lg-9"> - {% include gw_tools/tools.html %} + {% include git-wiki/sections/tools/tools.html %} {% if site.inc_before_toc %} {% include {{ site.inc_before_toc }} %} @@ -56,12 +59,12 @@ </div> <div class="row"> <div class="col"> - {% include gw_footer/footer.html %} + {% include git-wiki/sections/footer/footer.html %} </div> </div> </div> - {% include gw_tail/tail.html %} + {% include git-wiki/sections/tail/tail.html %} </body> </html> diff --git a/_layouts/git-wiki-bs-united.html b/_layouts/git-wiki-bs-united.html index 404cee9..8a730d2 100644 --- a/_layouts/git-wiki-bs-united.html +++ b/_layouts/git-wiki-bs-united.html @@ -1,7 +1,10 @@ -<!-- - This layout uses bootstrap with united theme ---> -{% include gw_defines/defines.html %} +{% comment %} +# +# This layout uses bootstrap with united theme +# +{% endcomment %} + +{% include git-wiki/defines/defines.html %} <!doctype html> <html> @@ -11,9 +14,9 @@ {% include {{ site.inc_before_head }} %} {% endif %} - {% include gw_head/meta.html %} - {% include gw_head/scripts.html %} - {% include gw_head/styles.html %} + {% include git-wiki/sections/head/meta.html %} + {% include git-wiki/sections/head/scripts.html %} + {% include git-wiki/sections/head/styles.html %} <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootswatch/4.1.3/united/bootstrap.min.css"> @@ -26,7 +29,7 @@ <div class="wrapper"> <div class="row"> <div class="col-lg-9"> - {% include gw_tools/tools.html %} + {% include git-wiki/sections/tools/tools.html %} {% if site.inc_before_toc %} {% include {{ site.inc_before_toc }} %} @@ -51,17 +54,17 @@ {% endif %} </div> <div class="col-lg-3"> - {% include gw_header/header.html %} + {% include git-wiki/sections/header/header.html %} </div> </div> <div class="row"> <div class="col"> - {% include gw_footer/footer.html %} + {% include git-wiki/sections/footer/footer.html %} </div> </div> </div> - {% include gw_tail/tail.html %} + {% include git-wiki/sections/tail/tail.html %} </body> </html> diff --git a/_layouts/git-wiki-default.html b/_layouts/git-wiki-default.html index 8bb038b..bd81329 100644 --- a/_layouts/git-wiki-default.html +++ b/_layouts/git-wiki-default.html @@ -1,9 +1,9 @@ -{% include gw_defines/defines.html %} +{% include git-wiki/defines/defines.html %} <!doctype html> <html> -{% include gw_head/head.html %} +{% include git-wiki/sections/head/head.html %} -{% include gw_content/body.html %} +{% include git-wiki/sections/content/body.html %} </html>
\ No newline at end of file diff --git a/_posts/.gitkeep b/_posts/.gitkeep new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/_posts/.gitkeep @@ -0,0 +1 @@ + diff --git a/assets/css/git-wiki-style.scss b/assets/css/git-wiki-style.scss index 34e537a..0d32653 100644 --- a/assets/css/git-wiki-style.scss +++ b/assets/css/git-wiki-style.scss @@ -1,4 +1,5 @@ --- +layout: "null" --- @import "git-wiki-style.scss"; diff --git a/sitemap_full.xml b/sitemap_full.xml index 1b6bd4f..6e21d19 100644 --- a/sitemap_full.xml +++ b/sitemap_full.xml @@ -1,5 +1,5 @@ --- -layout: null +layout: none sitemap: false --- <?xml version="1.0" encoding="UTF-8"?> |
