How to adjust Jekyll post order?

后端 未结 4 1720
长情又很酷
长情又很酷 2021-02-01 02:34

I have started a Jekyll based blog with a theme jekyll-now. I am new to Jekyll and how it operates (especially Liquid). I understand that new posts need to be as follows: 2014-1

4条回答
  •  花落未央
    2021-02-01 03:03

    Just faced the same problem and solved with this solution: https://groups.google.com/forum/#!topic/jekyll-rb/8QCIzevauSU

    Add a date field to the YAML Front Matter of a post, like so:

    date: 2010-09-15 14:40:45
    

    e.g. if you have 2 posts on 2014/12/31, you can add date: 2014-12-31 00:30:00 to latest_post.md, and date: 2014-12-31 00:10:00 to older_post.md.

    You can add time zone (e.g. date: 2014-12-31 00:10:00 +08:00) if needed

提交回复
热议问题