I have a _posts
folder and I just want a simple way to separate the posts in the folder into two different folders, and not have any permalink changes, for purely organizational reasons.
Just create subdirectories in your _posts
directory; the subdirectories will be ignored when Jekyll generates permalinks.
I recently did this to my _posts
folder because I have over 200 files. I decided to create folders that represent each year I have a posts for. Doing this though, broke post_url
. The error is something like as follows when you run jekyll build
Liquid Exception: Could not find post "blah-blah" in tag 'post_url'. Make sure the post exists and the name is correct. in _posts/2007/blah-blah.md
I had to go back in and where ever I used post_url
, I had to add /year/
in front of each post url links.
https://github.com/jekyll/jekyll/issues/1714#issuecomment-28167702
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With