问题
I don't care about dates because I edit my previous posts all the time, so I would like to replace _posts/2015-05-05-something.md
by _posts/something.md
.
回答1:
Using pages doesn't require files to have dates, eg: _posts/2015-05-05-something.md
becomes something.md
.
(The answer came from the amazing Github support)
回答2:
To do it you need to edit _config.yml
file. Variable you are interested in is permalink
. Jekyll has 4 build-in styles:
date - /:categories/:year/:month/:day/:title.html
pretty - /:categories/:year/:month/:day/:title/
ordinal - /:categories/:year/:y_day/:title.html
none - /:categories/:title.html
You probably need to use none
. Or you can build your own with a simple templates: more info here.
来源:https://stackoverflow.com/questions/30049870/jekyll-posts-filenames-without-dates