hugo mod
hugo mod
管理模块
概要
各种助手帮助管理项目中依赖关系图中的模块。此处的大多数操作需要在您的系统上安装 Go 版本(>= Go 1.12)和相关的 VCS 客户端(通常是 Git)。如果您仅对 /themes 中的模块进行操作,或者如果您已通过“hugo mod vendor”将它们供应商化,则不需要这样做。
请注意,Hugo 始终会首先解析站点配置中定义的组件,这些组件由 _vendor 目录(如果未提供 –ignoreVendorPaths 标志)、Go 模块或 themes 目录中的文件夹按该顺序提供。
有关更多信息,请参阅 https://gohugo.com.cn/hugo-modules/。
选项
-h, --help help for mod
从父命令继承的选项
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
--config string config file (default is hugo.yaml|json|toml)
--configDir string config dir (default "config")
-d, --destination string filesystem path to write files to
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
--themesDir string filesystem path to themes directory
另请参阅
- hugo - 构建您的站点
- hugo mod clean - 删除当前项目的 Hugo 模块缓存。
- hugo mod get - 解析您当前 Hugo 项目中的依赖项。
- hugo mod graph - 打印模块依赖关系图。
- hugo mod init - 将此项目初始化为 Hugo 模块。
- hugo mod npm - 各种 npm 助手。
- hugo mod tidy - 删除 go.mod 和 go.sum 中未使用的条目。
- hugo mod vendor - 将所有模块依赖项供应商化到 _vendor 目录中。
- hugo mod verify - 验证依赖项。