Skip to content

Instantly share code, notes, and snippets.

@zhuixinjian
Created August 4, 2015 14:40
Show Gist options
  • Select an option

  • Save zhuixinjian/0b7b8ed992651284fd11 to your computer and use it in GitHub Desktop.

Select an option

Save zhuixinjian/0b7b8ed992651284fd11 to your computer and use it in GitHub Desktop.
tag.html
---
layout: default
title: Tags
permalink: /blog/tags/
---
<header class="post-header">
<h1>Tags</h1>
</header>
<section id="archive">
{% for post_info in site.tags %}
{% assign post_tag = post_info[0] %}
{% assign tag = site.data.tags[post_tag] %}
{% if tag == null %}
{% assign tag = post_tag %}
{% endif %}
<h2 class="ahour"><a name="{{post_tag}}">{{ tag }} ({{ post_info[1].size }}):</a></h2>
<ul>
{% for post in post_info[1] %}
<li style="list-style-type:none;"><time>{{ post.date | date: "%m-%d" }}</time><a href="{{ post.url }}">{{ post.title }}</a></li>
{% endfor %}
</ul>
{% endfor %}
</section>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment