Skip to content

pressroom

Write posts locally and publish each one as a git commit that holds only that post's file.

The problem

A blog that lives in a static site's git repo has an awkward last step. The post has to land in the right folder with the frontmatter the site reads, in a commit that holds nothing else, and then it has to be pushed. pressroom does that step: pressroom publish writes the post into your site's content folder, commits that one file and pushes.

Get it

npm install -g @excellent-so/pressroom

Version 0.1.0 · MIT license

Quick start
pressroom init                    # writes pressroom.config.mjs here
# set siteRepo in pressroom.config.mjs to your site's git checkout
pressroom new "Hello, world"      # writes posts/hello-world.mdx, a draft
pressroom open                    # the viewer: edit, preview, publish
pressroom publish hello-world --dry-run
pressroom publish hello-world     # write it into the site repo, commit that one file, push

How to use it

  1. Install it with npm install -g @excellent-so/pressroom. It needs Node 20 or later and git on your PATH.
  2. Run pressroom init and set siteRepo to your site's checkout. Keep the posts folder outside the site repo, so drafts never end up in it.
  3. Write with pressroom new, then edit and preview in pressroom open.
  4. Run pressroom publish <slug> --dry-run to see the file it would write, then publish for real.

Where it came from

It started as the publish step of Excellent's own blog, pulled out into a tool with zero dependencies.

It works with Astro, Next.js, Eleventy or anything that builds Markdown or MDX files into pages. Publishing stages nothing else, never force-pushes, and makes no commit when the site's copy already matches. A site with its own frontmatter names, like the Astro blog template's pubDate, maps them in the config.

A commit that holds exactly one file is easy to check, and checking is the part Excellent does for AI agents' work. excellent.so