Hugo
Hugo is the fastest mainstream generator by a wide margin, which changes what goes wrong with it. The guides below are rarely about making a small Hugo site fast; they are about what happens at tens of thousands of pages, when template cost multiplies across languages, image processing dominates cold builds, module downloads outweigh rendering in CI, and a single build runs out of memory on a standard runner.
The build-time guides come first, then the ones about Hugo’s strongest built-in feature — multilingual sites — and then deployment and migration. Every number was measured with hyperfine or Hugo’s own template metrics on the site described in each guide.
Choosing the Right Static Site Generator for Production
- Choosing an SSG for API Reference DocumentationConceptAPI docs are generated, versioned and enormous. Compare Hugo, Astro, Eleventy and Next export on build scale, schema-driven pages, versioning and search.
- Picking an SSG for a Multi-Language Docs SiteConceptCompare i18n in Astro, Hugo, Eleventy, and Jekyll for multi-language documentation — routing, content organization, and build cost — with measured numbers across locales.
- SSG Selection Checklist for Engineering TeamsConceptA practical SSG selection checklist for engineering teams — score build scale, team skills, content model, i18n, hosting, ecosystem, and maintenance before you commit.
- Scoring SSG Long-Term Maintenance RiskConceptScore a static site generator’s five-year maintenance risk: project health, upgrade history, dependency surface, plugin ecosystem and your exit cost.
- Total Cost of Ownership for Static Site GeneratorsConceptEstimate the three-year cost of running a static site on Hugo, Eleventy, Astro, Next.js export or a docs framework: people time, builds, hosting, upgrades.
- Adding JSON-LD Structured Data at Build TimeHow-toEmit valid JSON-LD from frontmatter in Astro, Eleventy and Hugo: build objects not strings, pick the right schema.org types, and validate every page in CI.
- How to Benchmark Hugo vs Astro Build SpeedsHow-toBuild a reproducible Hugo-vs-Astro benchmark with hyperfine — identical corpus, pinned containers, production builds only — so numbers reflect the generators, not your laptop.
- Hugo Image Processing Cache in CIHow-toPersist Hugo’s resources cache between CI runs so image resizing and format conversion only run for new images, and keep the cache from growing forever.
- Hugo Modules and Dependency CachingHow-toUse Hugo Modules for themes and shared content, vendor or cache them in CI, pin versions with go.sum, and cut module download time from Hugo builds.
- Hugo partialCached for Faster BuildsHow-toFind the partials that dominate a Hugo build with template metrics, cache them with partialCached and the right variant keys, and avoid stale output.
- Indexing Hugo Sites with PagefindHow-toAdd fast, serverless search to a Hugo site with Pagefind: template attributes, taxonomy filters, multilingual output, CI integration and measured build cost.
- Migrating From Hugo to Astro Without Breaking URLsHow-toMove a Hugo site to Astro content collections while reproducing every permalink: slug mapping, a typed schema, shortcodes as MDX components, and a URL parity gate in CI.
- Migrating a Docs Site From Jekyll to HugoHow-toConvert Jekyll collections, Liquid includes and permalinks to Hugo sections, partials and URL config — with a build that drops from 96 s to 3.4 s on 1,200 pages.
- Multilingual Sites with HugoHow-toBuild a multilingual Hugo site: per-language content directories, translated menus and string tables, translationKey linking and build-time checks per locale.
- Parallel Hugo Builds Across CI JobsHow-toSplit a very large Hugo site into segments built in parallel CI jobs, merge the output safely, and measure when parallel builds beat a single larger runner.
- Porting Shortcodes and Includes Between GeneratorsHow-toMap Jekyll includes, Hugo shortcodes, Eleventy shortcodes and MDX components onto each other — with a census-first strategy, stub-then-port order, and a rendering test per component.
- Profiling Hugo Templates With Template MetricsHow-toUse hugo --templateMetrics to find which partial is eating your build: read cumulative duration, spot cache misses, and cut a 41 s build to 6 s on 4,000 pages.
- RSS and Atom Feeds for Static BlogsHow-toPublish valid RSS and Atom feeds from Eleventy, Astro or Hugo with full content, absolute URLs, stable IDs and correct headers, then check them in CI.
- SEO-Safe Pagination and Tag PagesHow-toGenerate crawlable pagination and useful tag archives in Eleventy and Hugo: plain links, self canonicals, a minimum tag size and no thin date archives.
- Sharing a Theme Across Hugo Sites With ModulesHow-toMove a theme copied into several Hugo sites into one versioned Hugo Module, let sites override safely, roll out updates with Renovate and keep CI fast.
- Speeding Up Hugo Builds with Render Hooks & CachingHow-toCut Hugo build time with render hooks, partialCached, a persistent --cacheDir, and the image resource cache — with measured before/after seconds from hyperfine.
- Splitting Large Hugo Sites with SegmentsHow-toUse Hugo segments to render only part of a very large site, build sections in parallel CI jobs, and merge the output without breaking links or sitemaps.
- hreflang and Language Alternates on Static SitesHow-toGenerate reciprocal hreflang alternates from a translation key at build time in Hugo, Astro or Eleventy, and validate every language group in CI.
- Fixing Hugo Builds That Fail After a Version UpgradeFixDiagnose Hugo build failures after an upgrade, from removed functions and pagination changes to output differences, then pin Hugo so it cannot recur.
- Fixing Hugo Builds That Slow Down After Adding TaxonomiesFixFind why a Hugo build got slower after adding tags or categories, then fix the term templates, related content and pagination that multiply the work.
- Reducing Hugo Memory Usage on CI RunnersFixWhy large Hugo builds run out of memory in CI, how to measure peak usage, and the settings, template changes and image strategies that cut it by more than half.
Core Web Vitals Optimization for SSGs
- Art Direction with the Picture ElementHow-toServe different crops of a hero image to mobile and desktop with picture and media queries in Astro, Eleventy and Hugo, without hurting LCP or causing layout shift.
- Generating Open Graph Images at Build TimeHow-toRender a unique social preview image for every page at build time with Satori and resvg, cache the output, and wire og:image tags into Astro, Hugo or Eleventy.
- Lazy-Loading Images Without Hurting LCPHow-toloading="lazy" saves bytes below the fold but delays the LCP image when applied to it. How to decide per image, per template, in Astro, Hugo and Eleventy.
- Optimizing WebP Images in Hugo Without PluginsHow-toGenerate WebP at build time using only Hugo's built-in image processing — no Node, no plugins, no system libraries. Requires the hugo-extended edition for WebP.
Production-Ready Deployment & CI/CD for SSGs
- Incremental Rebuild Times Across Astro, Eleventy and HugoComparisonAstro, Eleventy and Hugo measured on the same 5,000-page site for full, cached and single-page rebuilds, in CI and the dev server, with what each skips.
- Vercel ISR vs Static Generation for SSGsComparisonISR rebuilds pages on demand; static generation builds everything upfront. Astro, Eleventy, Hugo, and Jekyll have no ISR — they rebuild and purge at the CDN.
- Build Caching on Netlify and VercelHow-toMake Netlify and Vercel reuse dependency, framework and image caches between static site builds, verify cache hits in logs, and measure the savings.
- Caching Hugo Builds in GitHub ActionsHow-toCache Hugo resources/_gen and the module cache in GitHub Actions with content-hashed keys. Includes the workflow, cache key design, and measured CI minutes saved.
- Configuring Vercel for Hugo and EleventyHow-toDeploy Hugo and Eleventy sites on Vercel with pinned versions, the right output directory, clean URLs, trailing slashes, headers and redirects in vercel.json.
- Deploying Hugo to Cloudflare Pages and WorkersHow-toDeploy a Hugo site to Cloudflare Pages — pin HUGO_VERSION, set the build command and public output dir — and learn when Workers and Wrangler earn their place.
- GitHub Actions for Hugo DeploymentsHow-toDeploy Hugo with GitHub Actions using the extended edition for SCSS and WebP — a two-job build-and-publish pipeline, resource caching, and the Hugo-specific gotchas.
Often used with Hugo
- Astro17 shared guidesIslands, content collections, astro:assets and deployment.
- Eleventy15 shared guidesIncremental builds, image pipelines and the data cascade.
- Jekyll5 shared guidesPlugins, reproducible builds, upgrades and migration away.
- GitHub Actions3 shared guidesCaching, matrix builds, reusable workflows and pinning.
- Vercel3 shared guidesNon-Next.js generators, the Build Output API and caching.
- Next.js2 shared guidesStatic export for content sites, its limits and alternatives.