hugo
hugo 构建站点
简介 hugo 是主命令,用于构建你的 Hugo 站点。
Hugo 是一个快速且灵活的静态站点生成器, 是由 spf13 和众多贡献者使用 Go 编程语言开发的。
英文文档地址: http://gohugo.io/ 。 中文文档地址: https://www.gohugo.cn 。
hugo [flags] 参数 -b, --baseURL string 指向根目录的域名(和路径),例如: http://spf13.com/ -D, --buildDrafts 构建时包含标记为 draft(草稿) 的内容 -E, --buildExpired 构建时包含过期的内容 -F, --buildFuture 构建时包含发布日期为将来时间的内容 --cacheDir string 缓存目录的路径。默认为: $TMPDIR/hugo_cache/ --cleanDestinationDir 删除存在于 static 目录但不存在于目标目录中的文件 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") -c, --contentDir string 网站内容所在目录的路径 --debug 输出调试信息 -d, --destination string 生成的文件的输出路径 --disableKinds strings 禁止某类页面的生成(例如 home、RSS 等) --enableGitInfo 为页面添加 Git 修订、日期和作者信息 -e, --environment string 设置构建时的系统环境 --forceSyncStatic static 目录下的文件有修改时重新复制所有文件 --gc 开启在构建之后运行某些清理任务(例如删除无用的缓存文件) -h, --help 针对 hugo 命令的帮助信息 --i18n-warnings 打印缺失的翻译 --ignoreCache 忽略缓存目录 --ignoreVendor 忽略任何 _vendor 目录 -l, --layoutDir string 布局文件所在目录的路径 --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --minify 对任何能够支持的输出格式(HTML、XML 等)进行压缩 --noChmod 不同步文件的权限属性 --noTimes 不同步文件的修改时间 --path-warnings 遇到有重复的目标路径时则打印警告信息 --quiet 以安静模式构建 --renderToMemory 在内存中绘制页面(仅对性能测试有用) -s, --source string 读取文件时是相对于哪个文件路径 --templateMetrics 显示模板执行的的指标情况 --templateMetricsHints 与 --templateMetrics 一同使用时,将提示一些改进建议 -t, --theme strings 使用的主题(位于 /themes/THEMENAME/) --themesDir string 主题目录的路径 --trace file 将 trace 信息写入文件(通常没什么用) -v, --verbose 冗余输出 --verboseLog 冗余日志 -w, --watch 监控文件的修改并根据需要重新构建 请参阅 hugo check - 包含一些验证检查的功能 hugo config - 打印站点的配置信息 hugo convert - 将内容转换为不同格式 hugo deploy - 将你的站点部署到某个云服务上。 hugo env - 打印 Hugo 的版本和运行环境信息 hugo gen - 一组有用的生成器 hugo import - 从其他内容管理系统导入你的站点 hugo list - 列出各类型的内容 hugo mod - 各 Hugo 模块助手。 hugo new - 为站点创建新内容 hugo server - 一个高性能的 web 服务器 hugo version - 打印 Hugo 的版本号 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo check
hugo check 包含一些验证检查的功能
简介 包含一些验证检查的功能
参数 -h, --help check 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo - 构建站点 hugo check ulimit - 检查系统的 ulimit设置 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo check ulimit
hugo check ulimit Check system ulimit settings
Synopsis Hugo will inspect the current ulimit settings on the system. This is primarily to ensure that Hugo can watch enough files on some OSs
hugo check ulimit [flags] Options -h, --help help for ulimit Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo check - Contains some verification checks Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo config
hugo config 打印站点的配置信息
简介 打印站点的配置信息,包含默认和自定义配置。
hugo config [flags] 参数 -h, --help config 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo - 构建站点 hugo config mounts - Print the configured file mounts Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo config mounts
hugo config mounts Print the configured file mounts
Synopsis Print the configured file mounts
hugo config mounts [flags] Options -h, --help help for mounts Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo config - Print the site configuration Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo convert
hugo convert Convert your content to different formats
Synopsis Convert your content (e.g. front matter) to different formats.
See convert’s subcommands toJSON, toTOML and toYAML for more information.
Options -h, --help help for convert -o, --output string filesystem path to write files to --unsafe enable less safe operations, please backup first Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo - hugo builds your site hugo convert toJSON - Convert front matter to JSON hugo convert toTOML - Convert front matter to TOML hugo convert toYAML - Convert front matter to YAML Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo convert toJSON
hugo convert toJSON Convert front matter to JSON
Synopsis toJSON converts all front matter in the content directory to use JSON for the front matter.
hugo convert toJSON [flags] Options -h, --help help for toJSON Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo convert - Convert your content to different formats Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo convert toTOML
hugo convert toTOML Convert front matter to TOML
Synopsis toTOML converts all front matter in the content directory to use TOML for the front matter.
hugo convert toTOML [flags] Options -h, --help help for toTOML Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo convert - Convert your content to different formats Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo convert toYAML
hugo convert toYAML Convert front matter to YAML
Synopsis toYAML converts all front matter in the content directory to use YAML for the front matter.
hugo convert toYAML [flags] Options -h, --help help for toYAML Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) -o, --output string filesystem path to write files to --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory --unsafe enable less safe operations, please backup first -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo convert - Convert your content to different formats Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo deploy
hugo deploy Deploy your site to a Cloud provider.
Synopsis Deploy your site to a Cloud provider.
See https://gohugo.io/hosting-and-deployment/hugo-deploy/ for detailed documentation.
hugo deploy [flags] Options --confirm ask for confirmation before making changes to the target --dryRun dry run --force force upload of all files -h, --help help for deploy --invalidateCDN invalidate the CDN cache listed in the deployment target (default true) --maxDeletes int maximum # of files to delete, or -1 to disable (default 256) --target string target deployment from deployments section in config file; defaults to the first one Options inherited from parent commands --config string config file (default is path/config.
Read More »
hugo env
hugo env 打印 Hugo 的版本和运行环境信息
简介 打印 Hugo 的版本和运行环境信息。向 Hugo 报告 bug 时,这些信息很有用。
hugo env [flags] 参数 -h, --help env 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo - 构建站点 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo gen
hugo gen A collection of several useful generators.
Synopsis A collection of several useful generators.
Options -h, --help help for gen Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo - hugo builds your site hugo gen autocomplete - Generate shell autocompletion script for Hugo hugo gen chromastyles - Generate CSS stylesheet for the Chroma code highlighter hugo gen doc - Generate Markdown documentation for the Hugo CLI.
Read More »
hugo gen autocomplete
hugo gen autocomplete Generate shell autocompletion script for Hugo
Synopsis Generates a shell autocompletion script for Hugo.
NOTE: The current version supports Bash only. This should work for *nix systems with Bash installed.
By default, the file is written directly to /etc/bash_completion.d for convenience, and the command may need superuser rights, e.g.:
$ sudo hugo gen autocomplete Add --completionfile=/path/to/file flag to set alternative file-path and name.
Logout and in again to reload the completion scripts, or just source them in directly:
Read More »
hugo gen chromastyles
hugo gen chromastyles Generate CSS stylesheet for the Chroma code highlighter
Synopsis Generate CSS stylesheet for the Chroma code highlighter for a given style. This stylesheet is needed if pygmentsUseClasses is enabled in config.
See https://help.farbox.com/pygments.html for preview of available styles
hugo gen chromastyles [flags] Options -h, --help help for chromastyles --highlightStyle string style used for highlighting lines (see https://github.com/alecthomas/chroma) (default "bg:#ffffcc") --linesStyle string style used for line numbers (see https://github.
Read More »
hugo gen doc
hugo gen doc Generate Markdown documentation for the Hugo CLI.
Synopsis Generate Markdown documentation for the Hugo CLI.
This command is, mostly, used to create up-to-date documentation of Hugo’s command-line interface for https://gohugo.io/.
It creates one Markdown file per command with front matter suitable for rendering in Hugo.
hugo gen doc [flags] Options --dir string the directory to write the doc. (default "/tmp/hugodoc/") -h, --help help for doc Options inherited from parent commands --config string config file (default is path/config.
Read More »
hugo gen man
hugo gen man Generate man pages for the Hugo CLI
Synopsis This command automatically generates up-to-date man pages of Hugo’s command-line interface. By default, it creates the man page files in the “man” directory under the current directory.
hugo gen man [flags] Options --dir string the directory to write the man pages. (default "man/") -h, --help help for man Options inherited from parent commands --config string config file (default is path/config.
Read More »
hugo import
hugo import Import your site from others.
Synopsis Import your site from other web site generators like Jekyll.
Import requires a subcommand, e.g. hugo import jekyll jekyll_root_path target_path.
Options -h, --help help for import Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo - hugo builds your site hugo import jekyll - hugo import from Jekyll Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo import jekyll
hugo import jekyll hugo import from Jekyll
Synopsis hugo import from Jekyll.
Import from Jekyll requires two paths, e.g. hugo import jekyll jekyll_root_path target_path.
hugo import jekyll [flags] Options --force allow import into non-empty target directory -h, --help help for jekyll Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo import - Import your site from others.
Read More »
hugo list
hugo list Listing out various types of content
Synopsis Listing out various types of content.
List requires a subcommand, e.g. hugo list drafts.
Options -h, --help help for list Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo - hugo builds your site hugo list all - List all posts hugo list drafts - List all drafts hugo list expired - List all posts already expired hugo list future - List all posts dated in the future Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo list all
hugo list all List all posts
Synopsis List all of the posts in your content directory, include drafts, future and expired pages.
hugo list all [flags] Options -h, --help help for all Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo list - Listing out various types of content Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo list drafts
hugo list drafts 列出所有草稿
简介 列出内容目录中的所有草稿。
hugo list drafts [flags] 参数 -h, --help drafts 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string 读取文件时是相对于哪个文件路径 --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo list - 列出不同类型的内容 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo list expired
hugo list expired 列出所有过期的内容
简介 «««< HEAD 列出内容目录中所有已经过期的内容。 List all of the posts in your content directory which has already expired.
50ec7fd7870e8c8c0a79bf21cb99ead9913b7666
hugo list expired [flags] 参数 -h, --help expired 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string 读取文件时是相对于哪个文件路径 --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo list - 列出不同类型的内容 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo list future
hugo list future List all posts dated in the future
Synopsis List all of the posts in your content directory which will be posted in the future.
hugo list future [flags] Options -h, --help help for future Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo list - Listing out various types of content Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo mod
hugo mod Various Hugo Modules helpers.
Synopsis Various helpers to help manage the modules in your project’s dependency graph.
Most operations here requires a Go version installed on your system (>= Go 1.12) and the relevant VCS client (typically Git). This is not needed if you only operate on modules inside /themes or if you have vendored them via “hugo mod vendor”.
Note that Hugo will always start out by resolving the components defined in the site configuration, provided by a _vendor directory (if no –ignoreVendor flag provided), Go Modules, or a folder inside the themes directory, in that order.
Read More »
hugo mod clean
hugo mod clean Delete the Hugo Module cache for the current project.
Synopsis Delete the Hugo Module cache for the current project.
Note that after you run this command, all of your dependencies will be re-downloaded next time you run “hugo”.
Also note that if you configure a positive maxAge for the “modules” file cache, it will also be cleaned as part of “hugo –gc”.
hugo mod clean [flags] Options --all clean entire module cache -h, --help help for clean --pattern string pattern matching module paths to clean (all if not set), e.
Read More »
hugo mod get
hugo mod get Resolves dependencies in your current Hugo Project.
Synopsis Resolves dependencies in your current Hugo Project.
Some examples:
Install the latest version possible for a given module:
hugo mod get github.com/gohugoio/testshortcodes Install a specific version:
hugo mod get github.com/gohugoio/testshortcodes@v0.3.0 Install the latest versions of all module dependencies:
hugo mod get -u hugo mod get -u ./... (recursive) Run “go help get” for more information. All flags available for “go get” is also relevant here.
Read More »
hugo mod graph
hugo mod graph Print a module dependency graph.
Synopsis Print a module dependency graph with information about module status (disabled, vendored). Note that for vendored modules, that is the version listed and not the one from go.mod.
hugo mod graph [flags] Options -h, --help help for graph Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo mod - Various Hugo Modules helpers.
Read More »
hugo mod init
hugo mod init Initialize this project as a Hugo Module.
Synopsis Initialize this project as a Hugo Module. It will try to guess the module path, but you may help by passing it as an argument, e.g:
hugo mod init github.com/gohugoio/testshortcodes Note that Hugo Modules supports multi-module projects, so you can initialize a Hugo Module inside a subfolder on GitHub, as one example.
hugo mod init [flags] Options -h, --help help for init Options inherited from parent commands --config string config file (default is path/config.
Read More »
hugo mod tidy
hugo mod tidy Remove unused entries in go.mod and go.sum.
Synopsis Remove unused entries in go.mod and go.sum.
hugo mod tidy [flags] Options -h, --help help for tidy Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo mod - Various Hugo Modules helpers.
Read More »
hugo mod vendor
hugo mod vendor Vendor all module dependencies into the _vendor directory.
Synopsis Vendor all module dependencies into the _vendor directory.
If a module is vendored, that is where Hugo will look for it’s dependencies.
hugo mod vendor [flags] Options -h, --help help for vendor Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo mod - Various Hugo Modules helpers.
Read More »
hugo mod verify
hugo mod verify Verify dependencies.
Synopsis Verify checks that the dependencies of the current module, which are stored in a local downloaded source cache, have not been modified since being downloaded.
hugo mod verify [flags] Options --clean delete module cache for dependencies that fail verification -h, --help help for verify Options inherited from parent commands --config string config file (default is path/config.yaml|json|toml) --configDir string config dir (default "config") --debug debug output -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log enable Logging --logFile string log File path (if set, logging enabled automatically) --quiet build in quiet mode -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose verbose output --verboseLog verbose logging SEE ALSO hugo mod - Various Hugo Modules helpers.
Read More »
hugo new
hugo new Create new content for your site
Synopsis Create a new content file and automatically set the date and title. It will guess which kind of file to create based on the path provided.
You can also specify the kind with -k KIND.
If archetypes are provided in your theme or site, they will be used.
Ensure you run this within the root directory of your site.
hugo new [path] [flags] Options -b, --baseURL string hostname (and path) to the root, e.
Read More »
hugo new site
hugo new site 创建一个新站点(框架)
简介 在指定的目录中创建一个新站点。 新站点将具有正确的结构,但没有内容和主题。 通过 hugo new [contentPath] 命令创建新内容。
hugo new site [path] [flags] 参数 --force 强制在非空目录中初始化 -f, --format string 配置和 frontmatter 的格式(默认为 "toml") -h, --help site 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string 读取文件时是相对于哪个文件路径 --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo new - 为站点创建新内容 Auto generated by spf13/cobra on 3-Mar-2020
Read More »
hugo new theme
hugo new theme Create a new theme
Synopsis Create a new theme (skeleton) called [name] in the current directory. New theme is a skeleton. Please add content to the touched files. Add your name to the copyright line in the license and adjust the theme.toml file as you see fit.
hugo new theme [name] [flags] Options -h, --help help for theme Options inherited from parent commands --config string config file (default is path/config.
Read More »
hugo server
hugo server A high performance webserver
Synopsis Hugo provides its own webserver which builds and serves the site. While hugo server is high performance, it is a webserver with limited options. Many run it in production, but the standard behavior is for people to use it in development and use a more full featured server such as Nginx or Caddy.
‘hugo server’ will avoid writing the rendered and served content to disk, preferring to store it in memory.
Read More »
hugo version
hugo version 打印 Hugo 的版本号
简介 打印 Hugo 的版本信息
hugo version [flags] 参数 -h, --help version 命令相关的帮助信息 从父命令继承的参数 --config string 配置文件所在路径(默认为 path/config.yaml|json|toml) --configDir string 配置文件所在的目录(默认为 "config") --debug 输出调试信息 -e, --environment string build environment --ignoreVendor ignores any _vendor directory --log 开启日志功能 --logFile string 日志文件保存路径(如果设置了此参数,日志功能被自动开启) --quiet 以安静模式构建 -s, --source string filesystem path to read files relative from --themesDir string filesystem path to themes directory -v, --verbose 冗余输出 --verboseLog 冗余日志 请参阅 hugo - 构建站点 Auto generated by spf13/cobra on 3-Mar-2020
Read More »