Skip to content

Instantly share code, notes, and snippets.

@widianto
Created October 25, 2014 22:48
Show Gist options
  • Select an option

  • Save widianto/aea37cc58d5c386be325 to your computer and use it in GitHub Desktop.

Select an option

Save widianto/aea37cc58d5c386be325 to your computer and use it in GitHub Desktop.
jekyll tags
---
title: Tags
permalink: /en/tags/
---
{% assign tags_sorted = site.tags | sort %}
{% for tag in tags_sorted %}
{% assign posts = tag[1] | where:"lang","en" %}
{% if posts.size > 0 %}
<h2 id="{{ tag[0] }}">{{ tag[0] | prepend: "#" }}</h2>
<ul>
{% for post in posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% assign posts = nil %}
{% endfor %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment