Jekyll Filename Without Date

后端 未结 3 1473
离开以前
离开以前 2021-02-03 20:15

I want to build documentation site using Jekyll and GitHub Pages. The problem is Jekyll only accept a filename under _posts with exact pattern like YYYY-MM-DD

3条回答
  •  生来不讨喜
    2021-02-03 21:20

    Don't use posts; posts are things with dates. Sounds like you probably want to use collections instead; you get all the power of Posts; but without the pesky date / naming requirements.

    https://jekyllrb.com/docs/collections/

    I use collections for almost everything that isn't a post. This is how my own site is configured to use collections for 'pages' as well as more specific sections of my site:

提交回复
热议问题