Skip to content

Instantly share code, notes, and snippets.

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

  • Save zhuixinjian/9475eae0f2ae658c2d89 to your computer and use it in GitHub Desktop.

Select an option

Save zhuixinjian/9475eae0f2ae658c2d89 to your computer and use it in GitHub Desktop.
post.html
<article class="post-content">
{{ content }}
{% assign category = site.data.categories[page.category] %}
<p id="post-meta">Posted
{% if category == null %}
{% assign category = page.category %}
{% endif %}
in <code><a href="/blog/category/#{{ page.category }}">{{ category }}</a></code>
{% assign tag_size = page.tags.size %}
{% if tag_size > 0 %}
with tag:<i class="fa fa-tags"></i>
{% for post_tag in page.tags %}
<a href="/blog/tags/#{{post_tag}}">{{ post_tag }}</a>{% if forloop.last == false %},{% endif %}
{% endfor %}
{% endif %}</p>
</article>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment