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 forinit(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 ishugo.yaml|json|toml)--configDir="config"β config dir π-d,--destination=""β filesystem path to write files to-e,--environment=""β build environment π±--ignoreVendorPaths=""β ignores any_vendorfor module paths matching the given Glob pattern--logLevel=""β log level (debug|info|warn|error) π--noBuildLock[=false]β don't create the.hugo_build.lockfile--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
- arch rolling: hugo 0.169.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms