hugo mod get
hugo mod get
解析当前 Hugo 项目中的依赖项。
概要
解析当前 Hugo 项目中的依赖项。
一些示例:
安装给定模块的最新版本:
hugo mod get github.com/gohugoio/testshortcodes
安装特定版本:
hugo mod get github.com/gohugoio/[email protected]
安装所有直接模块依赖项的最新版本:
hugo mod get
hugo mod get ./... (递归)
安装所有模块依赖项(直接和间接)的最新版本:
hugo mod get -u
hugo mod get -u ./... (递归)
运行 “go help get” 获取更多信息。“go get” 的所有标志在此处也适用。
请注意,Hugo 将始终首先解析站点配置中定义的组件,这些组件按以下顺序提供:_vendor 目录(如果没有提供 –ignoreVendorPaths 标志)、Go Modules 或 themes 目录内的文件夹。
更多信息请参见 https://gohugo.io/hugo-modules/。
hugo mod get [flags] [args]
选项
-h, --help get 命令的帮助信息
从父命令继承的选项
--clock string 设置 Hugo 使用的时钟,例如 --clock 2021-11-06T22:30:00.00+09:00
--config string 配置文件(默认为 hugo.yaml|json|toml)
--configDir string 配置文件目录(默认为 "config")
-d, --destination string 写入文件的系统路径
-e, --environment string 构建环境
--ignoreVendorPaths string 忽略与给定 Glob 模式匹配的模块路径的任何 _vendor
--logLevel string 日志级别 (debug|info|warn|error)
--quiet 在安静模式下构建
-M, --renderToMemory 渲染到内存(主要在运行服务器时有用)
-s, --source string 读取文件的相对路径
--themesDir string 主题目录的系统路径
另请参阅
- hugo mod - 管理模块