hugo mod init
少于1分钟
hugo mod init
https://gohugo.io/commands/hugo_mod_init/
hugo mod init
将此项目初始化为 Hugo 模块。
概要
将该项目初始化为 Hugo 模块。它会尝试猜测模块路径,但您也可以通过参数来指定,例如:
hugo mod init github.com/gohugoio/testshortcodes
请注意,Hugo 模块支持多模块项目,因此您可以在 GitHub 的子文件夹中初始化 Hugo 模块,作为一个示例。
hugo mod init [flags]
选项
-h, --help help for init
从父命令继承的选项
--clock string 设置 Hugo 使用的时钟,例如 --clock 2021-11-06T22:30:00.00+09:00
--config string 配置文件(默认为 hugo.yaml|json|toml)
--configDir string 配置目录(默认为“config”)
--debug 调试输出
-e, --environment string 构建环境
--ignoreVendorPaths string 忽略任何 _vendor 目录,以匹配给定的 Glob 模式的模块路径
--log 启用日志记录
--logFile string 日志文件路径(如果设置,将自动启用日志记录)
--quiet 在安静模式下构建
-s, --source string 从文件系统路径读取文件的相对路径
--themesDir string 主题目录的文件系统路径
-v, --verbose 输出详细信息
--verboseLog 输出详细的日志记录
另请参阅
- hugo mod - 各种 Hugo 模块助手。
另请参阅
- hugo completion
- hugo completion bash
- hugo completion fish
- hugo completion powershell
- hugo completion zsh
最后修改 May 22, 2023: 第一次提交 (9f24e27)