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, like https://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 for pack. 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 is hugo.yaml|json|toml).
  • --configDir="config" β€” the config dir. default is literally config, no notes.
  • -d, --destination="" β€” filesystem path to write files to.
  • -e, --environment="" β€” build environment.
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern. glob girlies rise. πŸ’€
  • --logLevel="" β€” log level, and your options are debug|info|warn|error. pick your fighter.
  • --noBuildLock[=false] β€” don't create the .hugo_build.lock file. 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