How to write a post in this repo

The frontmatter contract, the draft workflow, and why the build fails when you get it wrong.

by ataila 2 min read

This file is a real article and a worked example of the frontmatter contract. Delete it once the site has content of its own.

Frontmatter

Every field is validated at build time by the Zod schema in src/content.config.ts. A missing pubDate, an unknown topic, or a campaign that isn’t lowercase-kebab fails pnpm build — it does not ship a broken card and find out on social.

FieldRequiredNotes
titleyes≤ 120 chars
descriptionyes≤ 200 chars — this is the meta description and the social card text
pubDateyesYYYY-MM-DD
updatedDatenoshown in the byline when present
langnoen (default) or hu — the language the article is written in
topicyesmust exist in topics in src/site.config.ts
tagsnolowercase-kebab, free-form
campaignnocontent-calendar tag, surfaces in the RSS categories
draftnotrue hides it from index, feeds and sitemap
featurednopins it to the top of listings

Drafts

draft: true keeps a post visible under pnpm dev and out of every production build. Write in the open, publish deliberately.

Topics are not tags

A topic is one of a handful of buckets you would build a landing page and a campaign around. A tag is fine-grained and free-form. Topics are validated; tags are not.

Topics matter structurally: a topic can be fronted by its own domain. See fronts in src/site.config.ts — that is how one build serves several public domains without any of them competing with the canonical host in search.

Adding a post

  1. Drop a .md file in src/content/posts/. The filename becomes the URL slug.
  2. Fill in the frontmatter above.
  3. pnpm dev and read it.
  4. Bump version.json.app.version, commit, push to main.