layout: default title: Archives permalink: /archive/ icon: archive type: page
<!– <h1>Archive of posts with {{ page.type }} '{{ page.title }}'</h1> –>
<div class=“page clearfix”>
<div class="left"> <h1>{{page.title}}</h1> <hr> <div class="well post"> {% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %} {% assign postsByMonth = site.posts | group_by_exp: "post", "post.date | date: '%Y %m'" %} {% for year in postsByYear %} <h2 id="y{{ post.date | date: '%Y' }}">{{year.name}}年</h2> {% for month in postsByMonth %} {% assign yearMonthArr = month.name | split: " " %} {% if year.name == yearMonthArr[0] %} <ul> <div class="month"> <h2 class="month" id="m{{yearMonthArr[0]}}{{yearMonthArr[1]}}">{{yearMonthArr[1]}}月</h2> <ul class="table-of-content"> {% for post in month.items %} <li> <time> {{ post.date | date:"%F" }} {{ post.date | date: "%a" }}. </time> <a class="title" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a> {% include category.html %} {% include tag.html %} </li> {% endfor %} </ul> </div> </ul> {% endif %} {% endfor %} {% if forloop.last == false %} <hr> {% endif %} {% endfor %} </div> </div> <button class="anchor"><i class="fa fa-anchor"></i></button> <div class="right"> <div class="wrap"> <div class="side content"> {% include sidebar-search.html %} </div> <!-- Content --> <div class="side content"> <div> Content </div> <ul class="table-of-content"> {% assign postsByYear = site.posts | group_by_exp: "post", "post.date | date: '%Y'" %} {% assign postsByMonth = site.posts | group_by_exp: "post", "post.date | date: '%Y %m'" %} {% for year in postsByYear %} <li><a href="#y{{year.name}}">{{year.name}}年 ({{year.items | size}}篇)</a></li> <ul> {% for month in postsByMonth %} {% assign yearMonthArr = month.name | split: " " %} {% if year.name == yearMonthArr[0] %} <li><a href="#m{{yearMonthArr[0]}}{{yearMonthArr[1]}}">{{yearMonthArr[1]}}月 ({{month.items | size}}篇)</a></li> {% endif %} {% endfor %} </ul> {% endfor %} </ul> </div> <!-- 其他div框放到这里 --> <!-- <div class="side">bbbb</div> --> </div> </div>
</div> <script src=“{{ ”/assets/js/pageContent.js “ | prepend: site.baseurl }}” charset=“utf-8”></script>