Static prerender
Bake the blog into static HTML files at build time. Ideal for static hosts (GitHub Pages, S3, plain nginx) and for CI/CD pipelines that redeploy on a schedule.
npx baas-blog prerender --key pk_YOUR_KEY --api https://api.dailysmith.com --out ./public/blog
This writes:
- public/
- blog/
- index.html
- your-first-post-slug/
- index.html
- another-post-slug/
- index.html
- blog/
Deploy the output with the rest of your site and the blog is fully crawlable with zero runtime dependencies.
Options
| Flag | Default | Meaning |
|---|---|---|
--key | — | Your site's public key (pk_…), required |
--out | ./public/blog | Output directory |
--api | https://api.blogsaas.app | API origin serving your content |
--base | /blog | The base path the blog is mounted at |
Keeping it fresh
Static output is a snapshot. Re-run the prerender:
- on every deploy, and
- on a schedule (e.g. a daily CI cron) so scheduled posts appear without a manual deploy.
Taking a post down
A run also removes the pages of posts that are no longer published, so a
post you take down in the dashboard disappears from the static output on the
next prerender. Deleting it is only possible because the CLI keeps a
manifest of what it wrote — .baas-prerender.json, in the output directory —
and deletes nothing it did not put there itself.
Keep that file next to the output between runs (or let CI build into a fresh directory, where there is nothing stale to remove in the first place). If you delete the manifest but keep the HTML, a taken-down post's page stays on disk until you remove it by hand.