layout | title | permalink |
---|---|---|
page |
存档 |
/archive/ |
-
{% assign categories_list = site.categories %}
{% if categories_list.first[0] == null %}
{% for category in categories_list %}
{{ category | join: "/" }} ({{ site.categories[category].size }})
{% endfor %}
{% else %}
{% for category in categories_list %}
{{ category[0] | join: "/" }} ({{ category[1].size }})
{% endfor %}
{% endif %}
-
{% assign tags_list = site.tags %}
{% if tags_list.first[0] == null %}
{% for tag in tags_list %}
{{ tag }} ({{ site.tags[tag].size }})
{% endfor %}
{% else %}
{% for tag in tags_list %}
{{ tag[0] }} ({{ tag[1].size }})
{% endfor %}
{% endif %}
-
{% assign posts_collate = site.posts %}
{% for post in posts_collate %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% capture this_month %}{{ post.date | date: "%B" }}{% endcapture %}
{% capture next_year %}{{ post.previous.date | date: "%Y" }}{% endcapture %}
{% capture next_month %}{{ post.previous.date | date: "%B" }}{% endcapture %}
{% if forloop.first %}
<h2>{{this_year}}</h2>
<h3>{{this_month}}</h3>
<ul>
{% endif %}
<li><span>{{ post.date | date: "%B %e, %Y " }}</span> <a href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a></li>
{% if forloop.last %}
</ul>
{% else %}
{% if this_year != next_year %}
</ul>
<h2>{{next_year}}</h2>
<h3>{{next_month}}</h3>
<ul>
{% else %}
{% if this_month != next_month %}
</ul>
<h3>{{next_month}}</h3>
<ul>
{% endif %}
{% endif %}
{% endif %}
{% endfor %} {% assign posts_collate = nil %}
{% for category in site.categories %}
-
{% assign pages_list = category[1] %}
{% for node in pages_list %}
{% if node.title != null %}
{% if group == null or group == node.group %}
{% if page.url == node.url %}
- {{node.title}} {% else %}
- {{node.title}} {% endif %} {% endif %} {% endif %} {% endfor %}
{% for tag in site.tags %}
-
{% assign pages_list = tag[1] %}
{% for node in pages_list %}
{% if node.title != null %}
{% if group == null or group == node.group %}
{% if page.url == node.url %}
- {{node.title}} {% else %}
- {{node.title}} {% endif %} {% endif %} {% endif %} {% endfor %}