diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-14 19:56:47 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-04-14 19:56:47 +0300 |
commit | 1cdef691cb199c40c7cf24fe2f77fe88d26acce7 (patch) | |
tree | 4686afb2bcf160758f750e204c51ce13341ac7c8 /_includes | |
parent | recategorize posts (diff) | |
download | jekyll-theme-1cdef691cb199c40c7cf24fe2f77fe88d26acce7.tar.gz jekyll-theme-1cdef691cb199c40c7cf24fe2f77fe88d26acce7.zip |
categories: sort categories in archive
Diffstat (limited to '')
-rw-r--r-- | _includes/jekyll-theme/categories/all.html | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/_includes/jekyll-theme/categories/all.html b/_includes/jekyll-theme/categories/all.html index 71b4bb6..82efce5 100644 --- a/_includes/jekyll-theme/categories/all.html +++ b/_includes/jekyll-theme/categories/all.html @@ -1,7 +1,8 @@ {% if site.posts.size == 0 %} <p>Sorry, no posts have been added yet.</p> {% else %} - {% for category in site.categories %} + {% assign categories = site.categories | sort %} + {% for category in categories %} <h2><a class="category" href="{{ '/' | relative_url }}{{ category[0] | slugify: 'pretty' }}/">{{ category[0] }}</a></h2> <ul> {% for post in category[1] %} |