Jekyll Filename Without Date

后端 未结 3 1475
离开以前
离开以前 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:05

    I guess that you are annoyed with the post url http://domaine.tld/category/2014/11/22/post.html.

    You cannot bypass the filename pattern for posts, but you can use permalink (see documentation).

    _posts/2014-11-22-other-post.md

    ---
    title:  "Other post"
    date:   2014-11-22 09:49:00
    permalink: anything-you-want
    ---
    

    File will be anything-you-want/index.html.

    Url will be http://domaine.tld/anything-you-want.

提交回复
热议问题