Skip to content

Commit

Permalink
Add categories page
Browse files Browse the repository at this point in the history
  • Loading branch information
woliveiras committed Sep 3, 2016
1 parent e51cbdd commit 733389e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ links:
url: /archive
- title: Contact
url: /contact
- title: Categories
url: /categories

# Build settings

Expand Down
20 changes: 20 additions & 0 deletions categories.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
layout: page
title: "Categories"
---

{% for tag in site.categories %}
<span id="{{ tag[0] | slugify }}">{{ tag[0] | capitalize }}</span>
<ul>
{% assign pages_list = tag[1] %}
{% for post in pages_list reversed %}
{% if post.title != null %}
{% if group == null or group == post.group %}
<li><a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}, <span ><time>{{ post.date | date: site.date_format }}</time></a></li>
{% endif %}
{% endif %}
{% endfor %}
{% assign pages_list = nil %}
{% assign group = nil %}
</ul>
{% endfor %}

0 comments on commit 733389e

Please sign in to comment.