A Self-maintaining filesystem for static blogs

dandep1 pts0 comments

A Self-maintaining filesystem for static blogs / My blog / danβ€”webnotes

Skip to main content

2026-07-01

πŸ”— A Self-maintaining filesystem for static blogs

I've just finished revamping the folder structure of this blog's content to include the date in the file name as in yyyy-mm-dd-post-title.md

This finally made opening the posts folder manageable as scanning the ever-growing list of titles, was causing me to dreading opening it at all.

Recently, my guiding principle has been to remove any friction from the projects I would like to work on more.

# The file structure

The typical Eleventy setup has a flat-files setup.

blog<br>β”œβ”€β”€ post-title.md<br>└── another-post-title.md

But in my quest for documenting and portability, I ended up setting up this folder structure instead.

blog<br>└── yyyy-mm-dd-post-title<br>β”œβ”€β”€ yyyy-mm-dd-post-title.md<br>└── image.png

This has a few advantages:

Co-location of a post's assets, images, snippets, etc.

Holding meta information such as title and date in the file name itself, rather than a generic index.md

Relative links in markdown easily map to their html links counterpart, once the site it's built.

# Automating the boring parts

Enter Claude Code, and adapting 11ty Buildawesome to my needs is just a matter of asking AI to write some scripts that integrate with the internal 11ty Dev Server watcher.

Updating either the Frontmatter property date or title now triggers a name change of both the file name and the folder name.

If the folder and filename change affected a live post, eg. with the Frontmatter property draft: false, a script will update all internal links that reference the updated path, and create a redirect , by adding an entry to redirects.json

"from": "/posts/2023-02-21-how-build-minimalist-markdown-blog-eleventy/",<br>"to": "/posts/2023-02-21-build-minimalist-markdown-blog-eleventy/"

If I upload an image file into a post folder, it will automatically compress it to a sensible size. No need to worry anymore about git-tracking 5MB pictures straight out of my camera roll.

A simple npm run new post title command, creates an empty document with the yyyy-mm-dd-post-title.md title slug, folder, today's date, set to draft and a scaffolded empty post.

date: 2026-07-01<br>title: "Post title"<br>project:<br>repository:<br>tags: []<br>selected: false<br>draft: true<br>description: ""<br>url:

2026-07-01

# Post title

### Resources

# Resources

Eleventy is now Build Awesome

Watch and Serve β€” Eleventy

post title folder blog date file

Related Articles