HUGO-BUILD(1)

πŸ’… HUGO-BUILD(1) β€” the Hugo Manual, bestie edition πŸŽ€

okay so this is the hugo-build page from the Hugo Manual, and honestly? it's a whole vibe. buckle up πŸ¦‹


✨ NAME ✨

hugo-build β€” build your project. that's it. that's the tweet. πŸ’–


🌸 SYNOPSIS 🌸

hugo build [flags]

🧚 DESCRIPTION 🧚

build is the main character command, fr fr β€” it's the one you use to build your Hugo project. πŸ‘‘

Hugo is a Fast and Flexible Static Site Generator built with love by spf13 and friends in Go. no cap, that's the actual description, we don't make the rules. πŸ’

Complete documentation is available at https://gohugo.io/. go read it, it's giving ✨reference material✨.


πŸ’… OPTIONS πŸ’…

so many flags. all of them iconic. here we go:

  • -b, --baseURL="" β€” hostname (and path) to the root, e.g. https://spf13.com/. your site's home address 🏠
  • -D, --buildDrafts[=false] β€” include content marked as draft. let the WIPs see the light of day πŸ™ˆ
  • -E, --buildExpired[=false] β€” include expired content. resurrect it, lowkey πŸ’€
  • -F, --buildFuture[=false] β€” include content with publishdate in the future. time travel behavior, honestly ⏰
  • --cacheDir="" β€” filesystem path to cache directory
  • --cleanDestinationDir[=false] β€” remove stale files from destination. declutter era 🧹
  • --clock="" β€” set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
  • --config="" β€” config file (default is hugo.yaml|json|toml). yup, all three, pick your fighter 🌈
  • --configDir="config" β€” config dir
  • -c, --contentDir="" β€” filesystem path to content directory
  • -d, --destination="" β€” filesystem path to write files to
  • --disableKinds=[] β€” disable different kind of pages (home, RSS etc.). sometimes you just don't want a homepage, and that's valid 🫢
  • --enableGitInfo[=false] β€” add Git revision, date, author, and CODEOWNERS info to the pages
  • -e, --environment="" β€” build environment
  • --forceSyncStatic[=false] β€” copy all files when static is changed. notice the period, it's in the original, we keep it, periodt πŸ’…
  • --gc[=false] β€” enable to run some cleanup tasks (remove unused cache files) after the build. self-care for your disk 🧼
  • -h, --help[=false] β€” help for build
  • --ignoreCache[=false] β€” ignore the configured file caches
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern
  • -l, --layoutDir="" β€” filesystem path to layout directory
  • --logLevel="" β€” log level (debug|info|warn|error)
  • --minify[=false] β€” minify any supported output format (HTML, XML etc.). shrink it, slay it βœ‚οΈ
  • --noBuildLock[=false] β€” don't create .hugo_build.lock file
  • --noChmod[=false] β€” don't sync permission mode of files
  • --noTimes[=false] β€” don't sync modification time of files
  • --panicOnWarning[=false] β€” panic on first WARNING log. dramatic? yes. useful? also yes, sometimes 😭
  • --poll="" β€” set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes
  • --printI18nWarnings[=false] β€” print missing translations
  • --printMemoryUsage[=false] β€” print memory usage to screen at intervals
  • --printPathWarnings[=false] β€” print warnings on duplicate target paths etc.
  • --printUnusedTemplates[=false] β€” print warnings on unused templates. notice the period again. we're consistent. πŸŽ€
  • --quiet[=false] β€” build in quiet mode. shhh 🀫
  • --renderSegments=[] β€” named segments to render (configured in the segments config)
  • -M, --renderToMemory[=false] β€” render to memory (mostly useful when running the server)
  • -s, --source="" β€” filesystem path to read files relative from
  • --templateMetrics[=false] β€” display metrics about template executions. numbers!! stats!! πŸ“Š
  • --templateMetricsHints[=false] β€” calculate some improvement hints when combined with --templateMetrics. bestie duo fr fr 🫢
  • -t, --theme=[] β€” themes to use (located in /themes/THEMENAME/)
  • --themesDir="" β€” filesystem path to themes directory
  • --trace="" β€” write trace to file (not useful in general). the original said it, not me, ngl πŸ’€
  • -w, --watch[=false] β€” watch filesystem for changes and recreate as needed. live-reload energy, we're obsessed πŸ‘€

πŸ¦‹ SEE ALSO πŸ¦‹

  • hugo(1) β€” the parent, the icon, the moment πŸ‘‘

that's the whole page bestie, every flag accounted for, no skips, no cap. now go build something pretty 🌸

hugo-build, from Hugo 0.169.0, dated Oct 2026 β€” mwah, xoxo, go touch some static files πŸ’œβœ¨

πŸ“¦ where this page comes from