diff options
Diffstat (limited to 'all/index.html')
-rw-r--r-- | all/index.html | 27 |
1 files changed, 16 insertions, 11 deletions
diff --git a/all/index.html b/all/index.html index 9188f3d..9ba7848 100644 --- a/all/index.html +++ b/all/index.html @@ -1,16 +1,21 @@ --- -title: Categories +title: All posts groups: - navbar -navbar_link: <span class="glyphicon glyphicon-th-list"></span> Categories +navbar_link: <span class="glyphicon glyphicon-th-list"></span> Posts navbar_priority: 2 --- -{% for category in site.categories %} - <h1><a class="category" href="{{ site.baseurl }}/{{ category[0] | slugify: 'pretty' }}">{{ category[0] }}</a></h1> - <hr> - <ul> - {% for post in category[1] %} - <li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.date | date: "%Y-%m-%d" }} — {{ post.title }}</a></li> - {% endfor %} - </ul> -{% endfor %} +{% if site.categories.size != 0 %} + {% for category in site.categories %} + <h1><a class="category" href="{{ site.baseurl }}/{{ category[0] | slugify: 'pretty' }}">{{ category[0] }}</a></h1> + <hr/> + <ul> + {% for post in category[1] %} + <li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.date | date: "%Y-%m-%d" }} — {{ post.title }}</a></li> + {% endfor %} + </ul> + {% endfor %} +{% else %} + <p>Sorry, no posts have been added yet.</p> + <hr/> +{% endif %} |