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 ./...(遞歸)
安裝所有模塊依賴項(直接和間接)的最新版本:
hugo mod get -u
hugo mod get -u ./...(遞歸)
運行 “go help get” 以獲取更多信息。“go get” 的所有標志在這裡也適用。
請注意,Hugo 將始終首先解析站點配置中定義的組件,由 _vendor 目錄提供(如果未提供 –ignoreVendorPaths 標志)、Go 模塊或 themes 目錄內的文件夾,按此順序。
有關更多信息,請參閱 https://www.hugodoc.com/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)
--noBuildLock 不創建 .hugo_build.lock 文件
--quiet 以安靜模式構建
-M, --renderToMemory 渲染到內存(主要在運行服務器時有用)
-s, --source string 讀取文件的相對文件系統路徑
--themesDir string 主題目錄的文件系統路徑另請參閱
- hugo mod - 管理模塊