hugo new
hugo new
創建新內容
簡介
創建新內容文件並自動設置日期和標題。 它將根據提供的路徑猜測要創建的文件類型。
您也可以使用 -k KIND 指定類型。
如果您的主題或站點中提供了原型,它們將被使用。
確保您在站點的根目錄內運行此命令。
選項
-h, --help new 的幫助從父命令繼承的選項
--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 - 構建您的站點
- hugo new content - 創建新內容
- hugo new site - 創建新站點
- hugo new theme - 創建新主題