diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-09 22:52:32 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2021-04-09 22:52:32 +0300 |
commit | e43991ee15f4166f0e88938d050b28e3d1d05afa (patch) | |
tree | 2a46252986bea74a89753b6f036c72f0f04ad3ae | |
parent | navbar: describe the workarounds (diff) | |
download | jekyll-theme-e43991ee15f4166f0e88938d050b28e3d1d05afa.tar.gz jekyll-theme-e43991ee15f4166f0e88938d050b28e3d1d05afa.zip |
categories: adjust links, optional archive link
-rw-r--r-- | _includes/categories/categories.html | 2 | ||||
-rw-r--r-- | _includes/categories/category.html | 4 | ||||
-rw-r--r-- | _includes/posts/posts.html | 2 | ||||
-rw-r--r-- | _layouts/post.html | 2 |
4 files changed, 6 insertions, 4 deletions
diff --git a/_includes/categories/categories.html b/_includes/categories/categories.html index 05ef954..960423a 100644 --- a/_includes/categories/categories.html +++ b/_includes/categories/categories.html @@ -1,6 +1,6 @@ {% if site.categories.size != 0 %} {% for category in site.categories %} - <h1><a class="category" href="{{ '/categories/' | relative_url }}{{ category[0] | slugify: 'pretty' }}">{{ category[0] }}</a></h1> + <h1><a class="category" href="{{ '/' | relative_url }}{{ category[0] | slugify: 'pretty' }}/">{{ category[0] }}</a></h1> <hr/> <ul> {% for post in category[1] %} diff --git a/_includes/categories/category.html b/_includes/categories/category.html index 78d5aa0..f7b7a8c 100644 --- a/_includes/categories/category.html +++ b/_includes/categories/category.html @@ -6,4 +6,6 @@ {% endfor %} </ul> {% endif %} -<p>For a complete list of posts grouped by category, please see <a href="{{ '/all/' | relative_url }}">this page</a>.</p> +{% if include.archive_link %} + <p>For a complete list of posts grouped by category, please see <a href="{{ include.archive_link | relative_url }}">this page</a>.</p> +{% endif %} diff --git a/_includes/posts/posts.html b/_includes/posts/posts.html index 724edc6..39dd858 100644 --- a/_includes/posts/posts.html +++ b/_includes/posts/posts.html @@ -6,7 +6,7 @@ <h2><a href="{{ post.url | relative_url }}">{{ post.title }}</a></h2> <p class="text-muted"> <span class="glyphicon glyphicon-time"></span> Posted on {{ post.date | date: '%-d %B %Y' }} - {%- if post.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a class="category" href="{{ '/categories/' | relative_url }}{{ post.category | slugify: 'pretty' }}/">{{ post.category }}</a>{% endif %} + {%- if post.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a class="category" href="{{ '/' | relative_url }}{{ post.category | slugify: 'pretty' }}/">{{ post.category }}</a>{% endif %} </p> {{ post.excerpt | markdownify }} <hr/> diff --git a/_layouts/post.html b/_layouts/post.html index 1af112a..6c4737d 100644 --- a/_layouts/post.html +++ b/_layouts/post.html @@ -4,7 +4,7 @@ layout: default <h1>{{ page.title }}</h1> <p class="text-muted"> <span class="glyphicon glyphicon-time"></span> Posted on {{ page.date | date: '%-d %B %Y' }} - {%- if page.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a class="category" href="{{ '/categories/' | relative_url }}{{ page.category | slugify: 'pretty' }}/">{{ page.category }}</a>{% endif %} + {%- if page.category %} in <span class="glyphicon glyphicon-folder-open"></span> <a class="category" href="{{ '/' | relative_url }}{{ page.category | slugify: 'pretty' }}/">{{ page.category }}</a>{% endif %} </p> {{ content }} <hr/> |