hugo mod init

hugo mod init

初始化專案為 Hugo 模組

說明

將目前專案初始化為 Hugo 模組。
Hugo 會嘗試推測模組的路徑,但你也可以透過參數提供,例如:

hugo mod init github.com/gohugoio/testshortcodes

請注意,Hugo 模組支援多模組專案,因此你可以在 GitHub 的子資料夾中初始化 Hugo 模組。

hugo mod init [flags] [args]

選項

  -b, --baseURL string           網站根目錄的主機名稱(及路徑),例如:https://spf13.com/
      --cacheDir string          快取目錄的檔案系統路徑
  -c, --contentDir string        內容目錄的檔案系統路徑
  -h, --help                     查看 init 指令的幫助
      --renderSegments strings   渲染已命名的段落(配置於 segments 設定中)
  -t, --theme strings            指定主題(位於 /themes/THEMENAME/)

繼承自父指令的選項

      --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           主題目錄的檔案系統路徑

相關內容