HUGO-MOD-NPM-PACK(1)
π
HUGO-MOD-NPM-PACK(1) β the girlies' guide to hugo mod npm pack
okay so this is the Hugo Manual page for hugo-mod-npm-pack, and bestie, it's lowkey iconic. it does exactly one thing and does it slayfully. let's get into it β¨
πΈ NAME πΈ
hugo-mod-npm-pack β merges your module Node.js dependencies into an npm workspace. that's it, that's the whole vibe. π
π¦ SYNOPSIS π¦
hugo mod npm pack [flags] [args]
yes queen, flags and args are both allowed. go off. π
π DESCRIPTION π
okay so picture this: you've got Hugo modules, right? and each one of them has its own Node.js dependencies just sitting there doing their own little thing. this command merges all of those dependencies from all your Hugo modules into one single npm workspace called packages/hugoautogen. one big happy family. π«Ά
the merged deps get written to packages/hugoautogen/package.json, and then the root package.json gets updated with a "workspaces" entry pointing at "packages/hugoautogen". so everything knows where to find everything. mutuals supporting mutuals. β¨
where do the source entries come from, i hear you ask? they're read from either package.hugo.json or package.json in the module root β and heads up, package.hugo.json takes precedence if both of them exist. so if you've got both, package.hugo.json is the main character and package.json is justβ¦ there. π no cap.
π‘ for more info, see the Node.js dependencies page: β¨/hugo-modules/nodejs-dependencies/β©
π₯ OPTIONS π₯
the flags, bestie. all of them. every single one:
-b,--baseURL=""β the hostname (and path) to your root, likehttps://spf13.com/. yes literally that example. π--cacheDir=""β filesystem path to the cache directory. where the cache lives. its home. π-c,--contentDir=""β filesystem path to your content directory.-h,--help[=false]β help forpack. when you're lost, she's there. π«Ά--renderSegments=[]β the named segments to render (these get configured in the segments config). note the empty list default, bestie.-t,--theme=[]β themes to use, located in/themes/THEMENAME/. plural, it's a list, we love a list. π
π§ OPTIONS INHERITED FROM PARENT COMMANDS π§
these are the ones she borrowed from her parent command (hugo mod npm), and they're all still here, don't worry:
--clock=""β sets the clock Hugo uses, e.g.--clock 2021-11-06T22:30:00.00+09:00. time travel but make it CLI. β°--config=""β config file (default ishugo.yaml|json|toml).--configDir="config"β the config dir. default is literallyconfig, no notes.-d,--destination=""β filesystem path to write files to.-e,--environment=""β build environment.--ignoreVendorPaths=""β ignores any_vendorfor module paths matching the given Glob pattern. glob girlies rise. π--logLevel=""β log level, and your options aredebug|info|warn|error. pick your fighter.--noBuildLock[=false]β don't create the.hugo_build.lockfile. it's giving "i don't need supervision". π--quiet[=false]β build in quiet mode. shhh. π€«-M,--renderToMemory[=false]β render to memory (mostly useful when running the server). big brain energy. π§-s,--source=""β filesystem path to read files relative from.--themesDir=""β filesystem path to the themes directory.
β SEE ALSO β
hugo-mod-npm(1) β go say hi to the parent, she's cool too. π
aaaand that's the whole page, bestie. you ate that. π β¨
π cute little sign-off: this was Hugo 0.169.0, dated Oct 2026, and it's the HUGO-MOD-NPM-PACK(1) page β now go merge those dependencies, periodt. π₯π
π¦ 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