Skip to content

Files

Latest commit

 

History

History
40 lines (36 loc) · 1.06 KB

index.md

File metadata and controls

40 lines (36 loc) · 1.06 KB
layout title tagline
page
颜海镜
专注Web前端

{% include JB/setup %}

    {% for post in site.posts limit:200 %} {% 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> &raquo; <a href="{{ BASE_PATH }}{{ 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 %}