This site ran on a static site generator I wrote in Go before it moved to a CMS. Building one is a great way to understand how publishing tools work — and for some sites it is the right long-term answer. Here is the honest account.

Why I built one at all

The original site was not a normal blog: it shipped data-driven calculator pages that had to match application math exactly. Content came from three places — Markdown articles, a tool database (CSV), and calculator definitions (YAML) — and all of it had to render through one tested engine.

A general-purpose generator like Hugo could do the Markdown part brilliantly and the data-driven part awkwardly. The calculator pages needed to read the same Go structures the math engine used, which is much easier when the generator is your own Go code.

The four pieces

  1. Front-matter parser. A minimal ----delimited block of key: value lines, plus a fallback for missing fields. Keep it tiny; you do not need full YAML semantics for a blog.
  2. Markdown rendering. I used goldmark — pure Go, table and strikethrough extensions, no CGO. It turns Markdown into HTML consistently.
  3. Templates. html/template with a base layout and page templates. The pitfall I hit: when every page template is parsed into one shared set, title and content blocks collide — the last file wins. The fix is to parse a fresh template set per page (base + partials + that page).
  4. A data pipeline. tools.csv and calculators.yaml loaded at build time, rendered into pages. Server-side default results were pre-rendered for SEO, and the same math was mirrored in JS for interactivity.

What I would tell my past self

  • It is ~600 lines, and the maintenance is a real cost — but for this site it was the product, not plumbing.
  • The consistency win is real. Because every page renders through the same base template and one stylesheet, new content cannot drift in style. No CMS theme can force this harder.
  • Use a generator when the content is data-driven (calculators, comparison tables, pricing). Use Hugo for a plain blog — you will finish in an afternoon instead of a week.

Would I do it again? For a data-heavy site, yes. For a normal blog, no — that is what Hugo, or a CMS, is for.