How to write a post in this repo
The frontmatter contract, the draft workflow, and why the build fails when you get it wrong.
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.
| Field | Required | Notes |
|---|---|---|
title | yes | ≤ 120 chars |
description | yes | ≤ 200 chars — this is the meta description and the social card text |
pubDate | yes | YYYY-MM-DD |
updatedDate | no | shown in the byline when present |
lang | no | en (default) or hu — the language the article is written in |
topic | yes | must exist in topics in src/site.config.ts |
tags | no | lowercase-kebab, free-form |
campaign | no | content-calendar tag, surfaces in the RSS categories |
draft | no | true hides it from index, feeds and sitemap |
featured | no | pins 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
- Drop a
.mdfile insrc/content/posts/. The filename becomes the URL slug. - Fill in the frontmatter above.
pnpm devand read it.- Bump
version.json→.app.version, commit, push tomain.