Go back

FastCode.Guru Website, Inside & Out

Published:

How a $3 Domain, Hugo 0.147, and Cloudflare Pages Power a Lightning-Fast C++ Blog

FastCode.Guru website

Table of Contents

Open Table of Contents

Why another C++ performance blog?

The field is crowded with excellent but siloed voices… nobody is consistently marrying real-world C++ performance work with clear, story-driven writing and real-world examples.

FastCode.Guru set out to close that gap. The editorial mission was ambitious, but the infrastructure goal was blunt-force simple:

That checklist ruled out heavyweight CMSs and framed the rest of the build.


Update! This article describes the legacy website

FastCode.Guru is no longer being built using the Hugo static website generator, as described in this article. The achilles heel of many website generators is the theme templates. Most of these are throwaway projects, not getting many updates after the initial release. I gave up on Hugo because I could not find a theme I liked and was still being updated.

I explored many alternatives until settling on Astro1. This will be subject of a future blog article, but so far, I am extremely happy with my choice.2


Core design decisions3

DecisionRationale
Static-site generator (Hugo)Fastest build times in the SSG arena; binary written in Go → single self-contained executable; no runtime dependencies
Edge hosting (Cloudflare Pages)PoP caching in >310 cities, built-in TLS, automatic image compression, free tier generous enough for a hobby-to-pro blog
Git-first workflow (GitHub)Treat every post like production code: pull request → review → merge → auto-deploy
Domain + email forwarding$3 first-year Namecheap promo; Cloudflare Email Routing gives unlimited aliases at zero cost4

Total monthly bill so far: **0.00(renewalwilljumpto0.00** (renewal will jump to 39/year—but still pocket-change compared with VPS + cPanel). And I got a killer domain name in the bargain.


Why Hugo instead of Next.js, Gatsby, or Jekyll?

Performance

Hugo 0.147 (released 25 Apr 2025) continues the cadence of weekly micro-optimisations, landing a new aligny shortcode without regressing build time.5

Developer-experience

Ecosystem fit


Architecture at a glance

┌────────────┐        git push        ┌──────────────────────────┐
│  Dev box   │ ─────────────────────▶│   GitHub repo (main)     │
└────────────┘                        └───────────┬──────────────┘
        ▲          webhook (built-in)             │
        │                                         │
`hugo server`                                     ▼
for live preview                      ┌──────────────────────────┐
                                      │ Cloudflare Pages build   │
                                      │ • downloads Hugo 0.147   │
                                      │ • hugo --minify          │
                                      └───────────┬──────────────┘

                                      atomic deploy to edge KV

                                       Visitor gets nearest PoP

No containers, no CI file to maintain—Cloudflare detects Hugo and provisions the build image automatically.


Theme & UX

Clarity theme

Performance tweaks

TechniqueWin
instant.page preload script80-120 ms perceived latency drop on desktop; trivial <script defer src="https://cdn.jsdelivr.net/.../instantpage.min.js"> injection
Modern images (WebP/AVIF)25–50 % smaller than PNG/JPEG; served conditionally via type="image/avif webp" sources
Hugo asset pipelineAutomatic fingerprinting + HTTP/2 push hints

Browser-support numbers for WebP/AVIF (≈97 % and 95 %) make the switch low-risk.


Content workflow: from idea to prod in <60 s

  1. Draft in Markdown—VS Code + Dendron snippets.
  2. Local previewhugo server -D --minify.
  3. Spell-check + lintcodespell and custom clang-format hook for code blocks.
  4. git commit (message format: feat(post): SIMD-friendly string hashing).
  5. Push to GitHub → build kicks off within ~5 s; Cloudflare’s build log shows deterministic, cache-friendly steps.
  6. Atomic deploy—Edge KV roll-forward; previous version instantly available on roll-back.

Cost breakdown

ItemUp-frontRecurring
Domain (first year promo)$3$39/yr afterwards
HugoFreeFree
Cloudflare PagesFreeFree (until 500 builds/month)
Email routingFreeFree
Total$3$39/yr

Even at renewal price, FastCode.Guru costs less per month than a single small DigitalOcean droplet—and there is no OS patch backlog.


Pros & cons of the stack

Pros

Cons


Alternative architectures weighed

StackWhy we passed
WordPress on VPS+ One-click comments/ecommerce; – Constant updates, mediocre performance without full-page cache, $5–10/mo hosting
Next.js on Vercel+ React component flexibility; – Cold starts for API routes, pricing per-invocation can spike, much larger JavaScript payloads
Gatsby+ Rich plugin ecosystem; – GraphQL layer slows builds for large content, React runtime cost
Notion → Super+ Zero setup; – Vendor lock-in, worse control over code formatting for snippets
Medium/Substack+ Built-in audience; – No custom domain on free tier, paywall pressure, limited formatting for C++ code blocks

The Hugo + Cloudflare combo was the only option that ticked all three original constraints (speed, maintenance, cost) without compromise.


Operational lessons learned

  1. Pin the Hugo version. Cloudflare’s “latest” runner occasionally jumps a major release; set HUGO_VERSION=0.147.0 in .env.
  2. Use branch deploy previews. Every PR gets a unique *.pages.dev URL—perfect for proofreading on mobile dimensions.
  3. Exploit Cloudflare caching rules. Override the default 30-minute TTL to 1 year for /images/*; keeps bandwidth near-zero.
  4. Automate image conversion. A makefile rule runs cwebp/avifenc so large screenshots never block PR merges.
  5. Add accessibility checks. Lighthouse in CI flags insufficient color contrast before it ships.

Sample build script

#!/usr/bin/env bash
set -eu

# 1. Install Hugo binary (if not cached)
curl -sSL https://github.com/gohugoio/hugo/releases/download/v$HUGO_VERSION/hugo_extended_${HUGO_VERSION}_Linux-64bit.tar.gz \
  | tar -xz -C /tmp && sudo mv /tmp/hugo /usr/local/bin

# 2. Build & minify
hugo --gc --minify --baseURL="${HUGO_BASEURL}"

# 3. Jamstack search index (lunr.js generation)
python scripts/build-search.py public/

# Cloudflare automatically uploads ./public

When a colleague clones the repo, the same script runs locally—no “works on my machine” drift.


SEO and social graph


Future roadmap

IdeaStatus
Add WebAssembly demos (e.g., real-time SIMD visualiser)investigating Emscripten bundle size
Edge-cache invalidation via Git hookprototype complete
Automatic Alt-text generator (OpenAI Vision)pending API cost analysis
Docs-as-code for sample libwaiting on library stability

Take-aways for fellow engineers


Conclusion

FastCode.Guru proves you don’t need a five-figure SaaS stack to run a professional, high-traffic programming blog. A $3 domain, Hugo’s millisecond builds, and Cloudflare’s global edge give you 95 % of what WordPress delivers—minus its complexity—and 100 % of the control open-source developers crave.

Better still, the stack mirrors the ethos of high-performance C++: simple abstractions, ruthless efficiency, measurable speed. The infrastructure story is the perfect prologue to every article you’ll publish next.

Footnotes

  1. https://astro.build/

  2. /posts/redesigning-fast-code-guru-hugo-astro

  3. https://github.com/carlos-reyes-123/fastcodeguru-hugo

  4. Easily creating and routing email addresses with Cloudflare Email

  5. Hugo 0.147.0 released - Announcements


Suggest Changes

Previous Post
Unique Id Generator Survey
Next Post
Effective Modern C++: Writing Clean, Bug-Free, and High-Performance Code