Static publishing, kept small
How this site turns a small Markdown collection into public pages without a publishing service.
This site keeps publishing deliberately close to the source. A post is a Markdown file in src/content/blog/ with a title, description, slug, draft flag, and date. Astro reads that collection during the build and emits static pages for the non-draft entries.
One source, a few destinations
The same published-post helper supplies the home-page list, the blog index, individual article routes, and the sitemap. That matters because a draft should not accidentally appear in one of those places while being absent from another.
- A lowercase kebab-case slug is the public URL.
draft: truekeeps an entry out of the generated site.- The build rejects duplicate slugs before Astro writes the output.
The resulting deployment is only static files. There is no dashboard, write API, or server-side publishing workflow to keep in sync. Writing remains ordinary Markdown, and the build is the boundary between work in the repository and public content.
Keeping the boundary clear
A static approach does not make a post private once it is merged. Every committed non-draft file becomes public output, so unpublished work stays off the production branch. The collection rules make that choice explicit without adding a second content system.