Back to blog

1 min read ExBye

Notes on Static Publishing

How static routes, RSS feeds, and content collections fit together in Astro.

Static publishing is a friendly default for blogs. The output is portable, CDN-friendly, and easy to preview before release.

In Astro, the route files are the publishing workflow:

  1. src/pages/blog/index.astro lists every published post.
  2. src/pages/blog/[...slug].astro renders each article from the content collection.
  3. src/pages/tags/[tag].astro builds topic pages.
  4. src/pages/rss.xml.ts turns the same posts into a feed.

Drafts

This starter uses a draft frontmatter field. Draft posts can stay in the repository while being excluded from generated routes and feeds.

That keeps writing close to the site without accidentally publishing unfinished notes.