Skip to content

Commit

Permalink
fix bug about for tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Gaohaoyang committed Jun 19, 2015
1 parent f3b31cf commit e67acb9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 20 deletions.
21 changes: 1 addition & 20 deletions index.html
Expand Up @@ -54,7 +54,7 @@ <h2>
<a href="javascript:;" class="categories-list-item" cate="All">
All<span class="my-badge"> {{site.posts | size}}</span>
</a>
{% for category in site.categories order:ascending %}
{% for category in site.categories %}
<a href="javascript:;" class="categories-list-item" cate="{{ category | first }}">
{{ category | first }} <span class="my-badge">{{ category | last | size }}</span>
</a>
Expand All @@ -63,22 +63,3 @@ <h2>
</div>
</div>

<!--
展示分类更好的方式:
http://stackoverflow.com/a/24745825
Bonus:
If you want to display only the posts in a certain tag/category (and not all posts), you can change the first for loop (the one inside the capture) to one of these:
{% for post in site.tags['whatever'] %}
{% for post in site.categories['whatever'] %}
===========
-->
15 changes: 15 additions & 0 deletions note.md
@@ -0,0 +1,15 @@

展示分类更好的方式:

http://stackoverflow.com/a/24745825

Bonus:

If you want to display only the posts in a certain tag/category (and not all posts), you can change the first for loop (the one inside the capture) to one of these:

{% for post in site.tags['whatever'] %}

{% for post in site.categories['whatever'] %}

===========

0 comments on commit e67acb9

Please sign in to comment.