在根目录下, 新建文件
tags.html
复制如下代码到
tags.html
文件中 (去掉内容中的\
).--- layout: page title: Tags --- <div class="tags-items"> <div class="tags-items-list"> {\% for tag in site.tags \%} <a href="#{\{ tag[0] | slugify \}}" class="post-tag">{\{ tag[0] \}}</a> {\% endfor \%} </div> <hr/> <div class="tags-items-section"> {\% for tag in site.tags \%} <h2 id="{\{ tag[0] | slugify \}}">{\{ tag[0] \}}</h2> <ul class="tags-items-posts"> {\% for post in tag[1] \%} <li> <a class="post-title" href="{\{ site.baseurl \}}{\{ post.url \}}"> {\{ post.title \}}<small class="post-date">{\{ post.date | date_to_string \}}</small> </a> </li> {\% endfor \%} </ul> {\% endfor \%} </div> </div>
修改样式,保存. 效果如下
Previous

2017-03-13
Next

2017-03-10