首页 > 用github pages 搭建博客的时候,博客怎么按时间添加的顺序排列?

用github pages 搭建博客的时候,博客怎么按时间添加的顺序排列?

我需要让发表的博客按照时间顺序排列,就是新发表的文章排在文章列表的下面,应该怎么设置?

访问地址

源码

谢谢~~


liquid模板里面支持反转list顺序,把 index.html 里面的for循环这么改:

{% for post in site.posts reversed %}
    <li class="title-li">
        <span class="write-time"># 发表于: {{ post.date | date_to_string }} </span>
        <a class="blog-title" href="{{ site.baseurl }}{{ post.url }}">{{ post.title }}</a>
    </li>
{% endfor %}
【热门文章】
【热门文章】