hugo new
hugo new
创建新内容
概要
创建一个新的内容文件,并自动设置日期和标题。它会根据提供的路径猜测要创建的文件类型。
您也可以使用 -k KIND
指定类型。
如果您的主题或站点中提供了原型,将会使用它们。
请确保在您站点的根目录下运行此命令。
选项
-h, --help help for new
从父命令继承的选项
--clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00
--config string config file (default is hugo.yaml|json|toml)
--configDir string config dir (default "config")
-d, --destination string filesystem path to write files to
-e, --environment string build environment
--ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern
--logLevel string log level (debug|info|warn|error)
--noBuildLock don't create .hugo_build.lock file
--quiet build in quiet mode
-M, --renderToMemory render to memory (mostly useful when running the server)
-s, --source string filesystem path to read files relative from
--themesDir string filesystem path to themes directory
另请参阅
- hugo - 构建您的站点
- hugo new content - 创建新内容
- hugo new site - 创建新站点(骨架)
- hugo new theme - 创建新主题(骨架)