Skip to content
Mavrick Blackburn
All posts

Publishing doesn't publish

Hitting Publish in /admin doesn't put a post on the internet — it flips a row in a database. Here's why that's on purpose, and the bug it caused before the blog was a week old.

Hitting Publish in /admin does not put a post on the internet. It updates a row in Supabase and nothing else. The admin screen says so directly, right under the button: "Published — but not on the site yet."

Why publishing isn't publishing

This site has no server — every page is a real HTML file, written once by next build and served as-is. There's no request-time code to ask "is there a new post?", so nothing can go live the moment a database row changes. Going live is a second, deliberate step: npm run deploy, run by hand, on my own machine.

Two actions, not one, is the annoying part. It's also the same decision as having no server at all: nothing moves on the internet except when I tell it to, and a broken build is my problem before it's a visitor's.

Where it actually bit

The blog's /blog/[slug] route is dynamic, so a static export needs generateStaticParams to hand it a real list of slugs to build pages for. With a fresh Supabase project and nothing published yet, that list was empty — and an export can't leave a dynamic route with nothing to build.

First attempt:

export const dynamicParams = false;