HUGO-MOD-INIT(1)

πŸ’… hugo-mod-init(1) β€” the Hugo Manual, bestie edition ✨

okay so you found the hugo-mod-init page in the Hugo Manual and you want the tea β˜• β€” here it is, no gatekeeping.


✨ NAME ✨

hugo-mod-init β€” initialize this project as a Hugo Module πŸŽ€

πŸ¦‹ SYNOPSIS πŸ¦‹

hugo mod init [flags] [args]

🌸 DESCRIPTION 🌸

So basically we're initializing this project as a Hugo Module. periodt. 🫢

Hugo will try to guess the module path all on its own (main character energy fr), but you can totally help it out by passing the path as an argument, like this:

hugo mod init github.com/gohugoio/testshortcodes

And ngl, the cute part: Hugo Modules supports multi-module projects, so you can legitimately initialize a Hugo Module inside a subfolder on GitHub β€” as one example β€” and it just works. iconic. πŸ‘‘

πŸ’– OPTIONS πŸ’–

  • -b, --baseURL="" β€” the hostname (and path) to the root, e.g. https://spf13.com/ ✨
  • --cacheDir="" β€” filesystem path to the cache directory πŸ“
  • -c, --contentDir="" β€” filesystem path to the content directory 🌸
  • -h, --help[=false] β€” help for init (the classic "wait what does this do again" button πŸ™ˆ)
  • --renderSegments=[] β€” named segments to render (these get configured in the segments config) πŸŽ€
  • -t, --theme=[] β€” themes to use (they live in /themes/THEMENAME/) πŸ’…

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

  • --clock="" β€” set the clock Hugo uses, e.g. --clock 2021-11-06T22:30:00.00+09:00 ⏰
  • --config="" β€” config file (default is hugo.yaml|json|toml)
  • --configDir="config" β€” config dir πŸ“
  • -d, --destination="" β€” filesystem path to write files to
  • -e, --environment="" β€” build environment 🌱
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern
  • --logLevel="" β€” log level (debug|info|warn|error) πŸ”
  • --noBuildLock[=false] β€” don't create the .hugo_build.lock file
  • --quiet[=false] β€” build in quiet mode 🀫
  • -M, --renderToMemory[=false] β€” render to memory (mostly useful when running the server) 🧠
  • -s, --source="" β€” filesystem path to read files relative from
  • --themesDir="" β€” filesystem path to the themes directory πŸ’œ

πŸ‘‘ SEE ALSO πŸ‘‘

  • hugo-mod(1) β€” go say hi to the parent command, iykyk 🫢

okay that's the whole page, you ate that πŸ’…βœ¨ β€” this was the Hugo Manual, Hugo 0.169.0, dated Oct 2026, and the page itself is HUGO-MOD-INIT(1). mwah, go init something iconic πŸ¦‹πŸ’–πŸ”₯

πŸ“¦ where this page comes from