Skip to content

Latest commit

 

History

History
113 lines (102 loc) · 3.36 KB

archive.md

File metadata and controls

113 lines (102 loc) · 3.36 KB
layout title permalink
page
存档
/archive/

By Category

By Tags

By Time

    {% 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 %}

{{ category[0] | join: "/" }}

    {% 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 %}
{% endfor %}

{% for tag in site.tags %}

{{ tag[0] }}

    {% 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 %}
{% endfor %}