Skip to content
Tanner Young
All posts

Building a Static Site That Lasts

2 min read

Placeholder post. This is sample content to exercise the layout — replace the body with your own writing. The frontmatter fields above are the ones the blog collection validates.

Every few years I rebuild a personal site, and every time I end up in the same place: plain files on disk, rendered ahead of time, served as static assets. The appeal is not performance, though that is a pleasant side effect. It is that a static site has very little that can rot.

The constraint that matters

A site survives when the number of moving parts stays small. Concretely:

  • Content is files. Markdown in a git repo outlives any CMS.
  • The build is reproducible. Same input, same output, a year from now.
  • There is no runtime. Nothing to patch at 2am, nothing to pay for monthly.
  • Escape hatches stay open. Markdown is portable; a proprietary format is not.

The third point does most of the work. A server is a standing obligation. A directory of HTML files is not.

What this costs

Static generation is not free. You give up anything that depends on per-request state — personalization, an authenticated dashboard, live data at the moment of the request. For a site that is mostly writing and a handful of project pages, that trade is trivially worth it.

Where it gets interesting is the middle ground. Search, for example, feels like it needs a server, and then you find a tool that indexes at build time:

// Search runs entirely in the browser against a prebuilt index.
const pagefind = await import('/pagefind/pagefind.js');
await pagefind.init();

const search = await pagefind.search('static site');
const results = await Promise.all(search.results.map((r) => r.data()));

console.log(results.map((r) => r.meta.title));

No database, no query endpoint, no rate limiting. The index ships as static files alongside everything else, and it keeps working whether ten people or ten thousand visit.

The part nobody mentions

The real benefit shows up eighteen months later, when you have not touched the project and you want to publish one short post. You clone the repo, add a Markdown file, and push. There is no dependency hell, no migration, no expired credential. The site is exactly where you left it.

That is the whole pitch. Not speed — continuity.