hugo_mod.md (4727B)
1 --- 2 title: "hugo mod" 3 slug: hugo_mod 4 url: /commands/hugo_mod/ 5 --- 6 ## hugo mod 7 8 Various Hugo Modules helpers. 9 10 ### Synopsis 11 12 Various helpers to help manage the modules in your project's dependency graph. 13 14 Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git). 15 This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor". 16 17 18 Note that Hugo will always start out by resolving the components defined in the site 19 configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided), 20 Go Modules, or a folder inside the themes directory, in that order. 21 22 See https://gohugo.io/hugo-modules/ for more information. 23 24 25 26 ### Options 27 28 ``` 29 -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ 30 -D, --buildDrafts include content marked as draft 31 -E, --buildExpired include expired content 32 -F, --buildFuture include content with publishdate in the future 33 --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ 34 --cleanDestinationDir remove files from destination not found in static directories 35 -c, --contentDir string filesystem path to content directory 36 -d, --destination string filesystem path to write files to 37 --disableKinds strings disable different kind of pages (home, RSS etc.) 38 --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages 39 --forceSyncStatic copy all files when static is changed. 40 --gc enable to run some cleanup tasks (remove unused cache files) after the build 41 -h, --help help for mod 42 --ignoreCache ignores the cache directory 43 -l, --layoutDir string filesystem path to layout directory 44 --minify minify any supported output format (HTML, XML etc.) 45 --noBuildLock don't create .hugo_build.lock file 46 --noChmod don't sync permission mode of files 47 --noTimes don't sync modification time of files 48 --panicOnWarning panic on first WARNING log 49 --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes 50 --printI18nWarnings print missing translations 51 --printMemoryUsage print memory usage to screen at intervals 52 --printPathWarnings print warnings on duplicate target paths etc. 53 --printUnusedTemplates print warnings on unused templates. 54 --templateMetrics display metrics about template executions 55 --templateMetricsHints calculate some improvement hints when combined with --templateMetrics 56 -t, --theme strings themes to use (located in /themes/THEMENAME/) 57 --trace file write trace to file (not useful in general) 58 ``` 59 60 ### Options inherited from parent commands 61 62 ``` 63 --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 64 --config string config file (default is path/config.yaml|json|toml) 65 --configDir string config dir (default "config") 66 --debug debug output 67 -e, --environment string build environment 68 --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern 69 --log enable Logging 70 --logFile string log File path (if set, logging enabled automatically) 71 --quiet build in quiet mode 72 -s, --source string filesystem path to read files relative from 73 --themesDir string filesystem path to themes directory 74 -v, --verbose verbose output 75 --verboseLog verbose logging 76 ``` 77 78 ### SEE ALSO 79 80 * [hugo](/commands/hugo/) - hugo builds your site 81 * [hugo mod clean](/commands/hugo_mod_clean/) - Delete the Hugo Module cache for the current project. 82 * [hugo mod get](/commands/hugo_mod_get/) - Resolves dependencies in your current Hugo Project. 83 * [hugo mod graph](/commands/hugo_mod_graph/) - Print a module dependency graph. 84 * [hugo mod init](/commands/hugo_mod_init/) - Initialize this project as a Hugo Module. 85 * [hugo mod npm](/commands/hugo_mod_npm/) - Various npm helpers. 86 * [hugo mod tidy](/commands/hugo_mod_tidy/) - Remove unused entries in go.mod and go.sum. 87 * [hugo mod vendor](/commands/hugo_mod_vendor/) - Vendor all module dependencies into the _vendor directory. 88 * [hugo mod verify](/commands/hugo_mod_verify/) - Verify dependencies. 89