Structure for the _posts
folder
All my posts used to live directly in the _posts
folder, like this:
_posts/
├── 2023-04-11-one-post-per-day.md
├── 2023-04-13-post-empty-front-matter.md
├── 2023-04-14-using-layout-post.md
├── 2023-04-15-doing-what-needs-to-be-done.md
├── 2023-04-16-shrinking-book-pile-10-minutes-every-day.md
├── 2023-04-17-make-something-wonderful.md
…
This started to get unwieldly, but thanks to Jekyll’s default functionality, I could just create a folder hierarchy like this:
_posts/
├── 2023/
│ └── 04/
│ ├── 2023-04-11-one-post-per-day.md
│ ├── 2023-04-13-post-empty-front-matter.md
│ ├── 2023-04-14-using-layout-post.md
…
├── 2023-05-01-embed-image.md
├── 2023-05-02-of-course-writing-is-hard.md
├── 2023-05-03-strategy-teaser.md├── oneup/
…
└── 2023-05-18-design-series-images.md
Now I can keep the posts for the current months in the top folder and move the ones from previous months into subfolders. This is easy to do with this git
command:
git mv _posts/2023-04-* _posts/2023/04/
Read more
URLs and links in Jekyll on Made Mmistakes explains how Jekyll uses the date on the post in more detail.