| 1 |
--- |
| 2 |
title: "hugo mod" |
| 3 |
slug: hugo_mod |
| 4 |
url: /commands/hugo_mod/ |
| 5 |
--- |
| 6 |
## hugo mod |
| 7 |
|
| 8 |
Manage modules |
| 9 |
|
| 10 |
### Synopsis |
| 11 |
|
| 12 |
Various helpers to help manage the modules in your project's dependency graph. |
| 13 |
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git). |
| 14 |
This is not needed if you only operate on modules inside /themes or if you have vendored them via "hugo mod vendor". |
| 15 |
|
| 16 |
|
| 17 |
Note that Hugo will always start out by resolving the components defined in the project |
| 18 |
configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided), |
| 19 |
Go Modules, or a folder inside the themes directory, in that order. |
| 20 |
|
| 21 |
See https://gohugo.io/hugo-modules/ for more information. |
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
### Options |
| 26 |
|
| 27 |
``` |
| 28 |
-h, --help help for mod |
| 29 |
``` |
| 30 |
|
| 31 |
### Options inherited from parent commands |
| 32 |
|
| 33 |
``` |
| 34 |
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 |
| 35 |
--config string config file (default is hugo.yaml|json|toml) |
| 36 |
--configDir string config dir (default "config") |
| 37 |
-d, --destination string filesystem path to write files to |
| 38 |
-e, --environment string build environment |
| 39 |
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern |
| 40 |
--logLevel string log level (debug|info|warn|error) |
| 41 |
--noBuildLock don't create .hugo_build.lock file |
| 42 |
--quiet build in quiet mode |
| 43 |
-M, --renderToMemory render to memory (mostly useful when running the server) |
| 44 |
-s, --source string filesystem path to read files relative from |
| 45 |
--themesDir string filesystem path to themes directory |
| 46 |
``` |
| 47 |
|
| 48 |
### SEE ALSO |
| 49 |
|
| 50 |
* [hugo](/commands/hugo/) - Build your project |
| 51 |
* [hugo mod clean](/commands/hugo_mod_clean/) - Delete the Hugo Module cache for the current project |
| 52 |
* [hugo mod get](/commands/hugo_mod_get/) - Resolves dependencies in your current Hugo project |
| 53 |
* [hugo mod graph](/commands/hugo_mod_graph/) - Print a module dependency graph |
| 54 |
* [hugo mod init](/commands/hugo_mod_init/) - Initialize this project as a Hugo Module |
| 55 |
* [hugo mod npm](/commands/hugo_mod_npm/) - Various npm helpers |
| 56 |
* [hugo mod tidy](/commands/hugo_mod_tidy/) - Remove unused entries in go.mod and go.sum |
| 57 |
* [hugo mod vendor](/commands/hugo_mod_vendor/) - Vendor all module dependencies into the _vendor directory |
| 58 |
* [hugo mod verify](/commands/hugo_mod_verify/) - Verify dependencies |