layout | title | tagline |
---|---|---|
page |
我的文章 |
{% include JB/setup %}
{% for post in site.posts %} {% 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 %}
-
{% endif %}
- {{ post.title }}
{% if forloop.last %}
-
{% else %}
{% comment %}
{% if this_month != next_month %}
-
{% endif %}
{% endcomment %}
{% endif %}
{% endif %}
{% endfor %}
<!-- {% 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 %} -->