hugo mod get
hugo mod get
解析当前 Hugo 项目中的依赖项。
概要
解析当前 Hugo 项目中的依赖项。
一些例子
为给定模块安装最新的可能版本
hugo mod get github.com/gohugoio/testshortcodes
安装特定版本
hugo mod get github.com/gohugoio/testshortcodes@v0.3.0
安装所有直接模块依赖项的最新版本
hugo mod get
hugo mod get ./... (recursive)
安装所有模块依赖项(直接和间接)的最新版本
hugo mod get -u
hugo mod get -u ./... (recursive)
运行“go help get”以获取更多信息。“go get”的所有可用标志也适用于此处。
请注意,Hugo 将始终首先解析站点配置中定义的组件,这些组件由 _vendor 目录(如果未提供 –ignoreVendorPaths 标志)、Go 模块或主题目录中的文件夹按此顺序提供。
有关更多信息,请参阅 https://gohugo.com.cn/hugo-modules/。
hugo mod get [flags] [args]
选项
-h, --help help for get
从父命令继承的选项
--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 mod - 管理模块