THKO

Type-safe content collections are underrated

article

The nicest part of authoring content in this setup is that a typo in the frontmatter fails the build instead of silently rendering an empty page.

A schema is documentation

The collection schema describes exactly what a post may contain: a title, a publish flag, a category, a list of tags, and a date. When I open an old post a year from now, the schema tells me what is allowed without having to remember.

Defaults do the boring work

published defaults to false, so a half-finished draft can sit in the repo without leaking to the world. Publishing is a one-word diff.

← Back to all posts