EN · · 3 min read
A Folder Is Not a URL
A short note on separating editorial organization from public identity so content can move without breaking the web around it.
NoteIntroductoryEvergreen
Folders and URLs often begin with the same shape. That resemblance is convenient, but it can quietly turn an implementation detail into a public contract.
Lens of Charlie stores writing under a year:
src/content/writing/2026/a-folder-is-not-a-url.md
The public article does not expose that year:
/writing/a-folder-is-not-a-url
The distinction looks small. It creates room for the content system to change without asking readers, search engines, feeds, and old bookmarks to change with it.
A folder answers an editorial question
The filesystem helps the author maintain the source. A year folder answers practical questions: when was this written, where should a new file go, and how can a large directory remain navigable?
Those questions belong to the repository. They may change as the corpus grows. Writing could later be arranged by year and language, archived in a different source tree, or migrated into another build system. None of those changes necessarily alters the identity of an article.
A folder is therefore a useful coordinate, not a promise to the reader.
A URL answers a publishing question
A URL is referenced outside the repository. It can appear in RSS readers, messages, notes, search indexes, documentation, and links from other sites. Once published, it becomes part of a distributed system that the author does not control.
That makes stability more valuable than structural accuracy. A reader usually does not need to know whether an article lives under 2025, technical, or drafts/revised. The useful identity is the article itself:
/writing/async-await-is-not-a-thread
The publication date remains visible in metadata and on the page. It does not need to be encoded into every path to remain meaningful.
Categories should not become storage
The same principle applies to categories. A category is a way to curate discovery, not a permanent address and not necessarily a folder.
An article may begin in the common chronological stream and later earn a place in Technical, Learning, or Notes. Moving it should change where it is discovered without changing where it is linked.
In Lens of Charlie, category is therefore an optional frontmatter field:
category: notes
Without that field, the article remains in its year group. With it, the article moves into an ordered editorial shelf. In both cases, the slug stays the same.
This keeps three concerns independent:
- the folder organizes source files;
- metadata organizes the reading interface;
- the slug preserves public identity.
When one concern changes, the others do not move automatically.
Indirection can be a form of simplicity
Indirection is often described as additional complexity. Sometimes it is. A route helper, a category registry, and schema validation are more code than directly printing a content ID.
But direct coupling does not remove complexity; it postpones it. The cost appears when a folder is renamed, a category is reorganized, or an article moves across years and every generated link must be repaired.
A small explicit boundary is worthwhile when it protects something durable from something expected to change. Here, the public URL is durable while editorial organization is allowed to evolve.
Keep the escape hatch visible
Separating concerns does not eliminate migration work. Slugs can still change, categories can still become confusing, and old URLs may already exist. The system should make those cases deliberate:
- duplicate slugs fail the build;
- renamed public routes require permanent redirects;
- category IDs come from one ordered registry;
- empty categories stay out of the interface;
- content without a category has a predictable chronological home.
These rules are small enough to remember and strict enough to prevent accidental drift.
The broader lesson is not that every site needs a routing abstraction. It is that public identity deserves a different lifetime from repository organization. A folder should be free to help the author today without deciding what every reader must type tomorrow.