what i've learned today

A static site doesn't need a database

2026-07-18 architecture static-sites cloudflare

I had originally planned Postgres + Prisma for this garden. Then I wrote down what the site actually had to do: list notes, filter by tag, search, count notes per section.

Every one of those is derivable from the markdown at build time. The database would have stored a second copy of facts the files already contain — and I’d be maintaining a server forever in exchange for nothing.

What replaced it:

  • Tags and sections — read from frontmatter and folder names during the build
  • Search — Pagefind builds a static index at deploy time, no search server
  • Counts — just length on an array

One constraint I hit along the way: Cloudflare Pages’ built-in git integration can’t pull a private repo as a content source. So the build runs in GitHub Actions instead, and only the finished dist/ gets handed to Cloudflare.

Related: Why I chose repository_dispatch over a git submodule

← all notes