diff --git a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.headers b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.headers index fedd73525..1216e42d4 100644 --- a/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.headers +++ b/_vendor/github.com/gohugoio/gohugoioTheme/layouts/index.headers @@ -3,6 +3,3 @@ X-XSS-Protection: 1; mode=block X-Content-Type-Options: nosniff Referrer-Policy: origin-when-cross-origin -/* - Link: <{{ "dist/app.bundle.js" | relURL }}>; rel=preload; as=script - Link: <{{ "dist/main.css" | relURL }}>; rel=preload; as=style diff --git a/_vendor/modules.txt b/_vendor/modules.txt index 5c4b53271..1c7cac307 100644 --- a/_vendor/modules.txt +++ b/_vendor/modules.txt @@ -1 +1 @@ -# github.com/gohugoio/gohugoioTheme v0.0.0-20230418063032-99f9185b8e11 +# github.com/gohugoio/gohugoioTheme v0.0.0-20230527124826-78bc315d7b8a diff --git a/content/en/about/hugo-and-gdpr.md b/content/en/about/hugo-and-gdpr.md index 3e0a160c7..b028c4543 100644 --- a/content/en/about/hugo-and-gdpr.md +++ b/content/en/about/hugo-and-gdpr.md @@ -27,9 +27,9 @@ toc: true ## All Privacy Settings -Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `config.toml`). +Below are all privacy settings and their default value. These settings need to be put in your site config (e.g. `hugo.toml`). - {{< code-toggle file="config">}} +{{< code-toggle file="hugo" >}} [privacy] [privacy.disqus] disable = false @@ -58,7 +58,7 @@ privacyEnhanced = false An example Privacy Config that disables all the relevant services in Hugo. With this configuration, the other settings will not matter. - {{< code-toggle file="config">}} + {{< code-toggle file="hugo" >}} [privacy] [privacy.disqus] disable = true @@ -98,7 +98,7 @@ simple **Note:** If you use the _simple mode_ for Instagram and a site styled with Bootstrap 4, you may want to disable the inline styles provided by Hugo: - {{< code-toggle file="config">}} + {{< code-toggle file="hugo" >}} [services] [services.instagram] disableInlineCSS = true @@ -114,7 +114,7 @@ simple **Note:** If you use the _simple mode_ for Twitter, you may want to disable the inline styles provided by Hugo: - {{< code-toggle file="config">}} + {{< code-toggle file="hugo" >}} [services] [services.twitter] disableInlineCSS = true diff --git a/content/en/commands/hugo.md b/content/en/commands/hugo.md index 0b42d5521..8dbdd6231 100644 --- a/content/en/commands/hugo.md +++ b/content/en/commands/hugo.md @@ -39,6 +39,7 @@ hugo [flags] --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages -e, --environment string build environment --forceSyncStatic copy all files when static is changed. + --format string preferred file format (toml, yaml or json) (default "toml") --gc enable to run some cleanup tasks (remove unused cache files) after the build -h, --help help for hugo --ignoreCache ignores the cache directory @@ -82,5 +83,5 @@ hugo [flags] * [hugo mod](/commands/hugo_mod/) - Various Hugo Modules helpers. * [hugo new](/commands/hugo_new/) - Create new content for your site * [hugo server](/commands/hugo_server/) - A high performance webserver -* [hugo version](/commands/hugo_version/) - Print the version number of Hugo +* [hugo version](/commands/hugo_version/) - Print Hugo version and environment info diff --git a/content/en/commands/hugo_completion.md b/content/en/commands/hugo_completion.md index 5387f7aed..7ab87f800 100644 --- a/content/en/commands/hugo_completion.md +++ b/content/en/commands/hugo_completion.md @@ -26,7 +26,9 @@ See each sub-command's help for details on how to use the generated script. --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_completion_bash.md b/content/en/commands/hugo_completion_bash.md index 22d948647..a4d4d6f11 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -49,7 +49,9 @@ hugo completion bash --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_completion_fish.md b/content/en/commands/hugo_completion_fish.md index 481507044..6fe2d7f16 100644 --- a/content/en/commands/hugo_completion_fish.md +++ b/content/en/commands/hugo_completion_fish.md @@ -40,7 +40,9 @@ hugo completion fish [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_completion_powershell.md b/content/en/commands/hugo_completion_powershell.md index 7e6abb9f4..614023dbb 100644 --- a/content/en/commands/hugo_completion_powershell.md +++ b/content/en/commands/hugo_completion_powershell.md @@ -37,7 +37,9 @@ hugo completion powershell [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_completion_zsh.md b/content/en/commands/hugo_completion_zsh.md index 9612817e3..7e17bc96d 100644 --- a/content/en/commands/hugo_completion_zsh.md +++ b/content/en/commands/hugo_completion_zsh.md @@ -18,7 +18,7 @@ to enable it. You can execute the following once: To load completions in your current shell session: - source <(hugo completion zsh); compdef _hugo hugo + source <(hugo completion zsh) To load completions for every new session, execute once: @@ -51,7 +51,9 @@ hugo completion zsh [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_config.md b/content/en/commands/hugo_config.md index ca73bbe4b..0c54f0e6d 100644 --- a/content/en/commands/hugo_config.md +++ b/content/en/commands/hugo_config.md @@ -12,31 +12,33 @@ Print the site configuration Print the site configuration, both default and custom settings. ``` -hugo config [flags] +hugo config [command] [flags] ``` ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -e, --environment string build environment - -h, --help help for config - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -s, --source string filesystem path to read files relative from - --themesDir string filesystem path to themes directory + -h, --help help for config ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_config_mounts.md b/content/en/commands/hugo_config_mounts.md index 825ddf1b5..1019f5102 100644 --- a/content/en/commands/hugo_config_mounts.md +++ b/content/en/commands/hugo_config_mounts.md @@ -8,7 +8,7 @@ url: /commands/hugo_config_mounts/ Print the configured file mounts ``` -hugo config mounts [flags] +hugo config mounts [flags] [args] ``` ### Options @@ -24,7 +24,9 @@ hugo config mounts [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_convert.md b/content/en/commands/hugo_convert.md index e8015a5b5..0c5384fbb 100644 --- a/content/en/commands/hugo_convert.md +++ b/content/en/commands/hugo_convert.md @@ -13,30 +13,36 @@ Convert your content (e.g. front matter) to different formats. See convert's subcommands toJSON, toTOML and toYAML for more information. +``` +hugo convert [command] [flags] +``` + ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -e, --environment string build environment - -h, --help help for convert - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -o, --output string filesystem path to write files to - -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 + -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 hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_convert_toJSON.md b/content/en/commands/hugo_convert_toJSON.md index 162c42d0a..73c2fc303 100644 --- a/content/en/commands/hugo_convert_toJSON.md +++ b/content/en/commands/hugo_convert_toJSON.md @@ -13,7 +13,7 @@ toJSON converts all front matter in the content directory to use JSON for the front matter. ``` -hugo convert toJSON [flags] +hugo convert toJSON [flags] [args] ``` ### Options @@ -29,7 +29,9 @@ hugo convert toJSON [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_convert_toTOML.md b/content/en/commands/hugo_convert_toTOML.md index 50c0c9ebf..9141eb1a2 100644 --- a/content/en/commands/hugo_convert_toTOML.md +++ b/content/en/commands/hugo_convert_toTOML.md @@ -13,7 +13,7 @@ toTOML converts all front matter in the content directory to use TOML for the front matter. ``` -hugo convert toTOML [flags] +hugo convert toTOML [flags] [args] ``` ### Options @@ -29,7 +29,9 @@ hugo convert toTOML [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_convert_toYAML.md b/content/en/commands/hugo_convert_toYAML.md index bf2d28421..a932921cf 100644 --- a/content/en/commands/hugo_convert_toYAML.md +++ b/content/en/commands/hugo_convert_toYAML.md @@ -13,7 +13,7 @@ toYAML converts all front matter in the content directory to use YAML for the front matter. ``` -hugo convert toYAML [flags] +hugo convert toYAML [flags] [args] ``` ### Options @@ -29,7 +29,9 @@ hugo convert toYAML [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_deploy.md b/content/en/commands/hugo_deploy.md index 7b14c30ef..0531664dd 100644 --- a/content/en/commands/hugo_deploy.md +++ b/content/en/commands/hugo_deploy.md @@ -16,38 +16,40 @@ documentation. ``` -hugo deploy [flags] +hugo deploy [flags] [args] ``` ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - --confirm ask for confirmation before making changes to the target - --dryRun dry run - -e, --environment string build environment - --force force upload of all files - -h, --help help for deploy - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - --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) - --workers int number of workers to transfer files. (default 10) - -s, --source string filesystem path to read files relative from - --target string target deployment from deployments section in config file; defaults to the first one - --themesDir string filesystem path to themes directory + --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 + --workers int number of workers to transfer files. defaults to 10 (default 10) ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_env.md b/content/en/commands/hugo_env.md index 632614d50..e001c6098 100644 --- a/content/en/commands/hugo_env.md +++ b/content/en/commands/hugo_env.md @@ -9,13 +9,10 @@ Print Hugo version and environment info ### Synopsis -Print Hugo version and environment info. This is useful in Hugo bug reports. - -If you add the -v flag, you will get a full dependency list. - +Print Hugo version and environment info. This is useful in Hugo bug reports ``` -hugo env [flags] +hugo env [flags] [args] ``` ### Options @@ -31,7 +28,9 @@ hugo env [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_gen.md b/content/en/commands/hugo_gen.md index 281669b59..b589e2e0f 100644 --- a/content/en/commands/hugo_gen.md +++ b/content/en/commands/hugo_gen.md @@ -7,6 +7,10 @@ url: /commands/hugo_gen/ A collection of several useful generators. +``` +hugo gen [command] [flags] +``` + ### Options ``` @@ -20,7 +24,9 @@ A collection of several useful generators. --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md index ed434b1c7..5ea23381d 100644 --- a/content/en/commands/hugo_gen_chromastyles.md +++ b/content/en/commands/hugo_gen_chromastyles.md @@ -14,7 +14,7 @@ Generate CSS stylesheet for the Chroma code highlighter for a given style. This See https://xyproto.github.io/splash/docs/all.html for a preview of the available styles ``` -hugo gen chromastyles [flags] +hugo gen chromastyles [flags] [args] ``` ### Options @@ -33,7 +33,9 @@ hugo gen chromastyles [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_gen_doc.md b/content/en/commands/hugo_gen_doc.md index b6e6a99f2..16593400a 100644 --- a/content/en/commands/hugo_gen_doc.md +++ b/content/en/commands/hugo_gen_doc.md @@ -10,15 +10,14 @@ 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. + 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] +hugo gen doc [flags] [args] ``` ### Options @@ -35,7 +34,9 @@ hugo gen doc [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_gen_man.md b/content/en/commands/hugo_gen_man.md index c37ca2420..3602dcc93 100644 --- a/content/en/commands/hugo_gen_man.md +++ b/content/en/commands/hugo_gen_man.md @@ -10,11 +10,11 @@ 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. + command-line interface. By default, it creates the man page files + in the "man" directory under the current directory. ``` -hugo gen man [flags] +hugo gen man [flags] [args] ``` ### Options @@ -31,7 +31,9 @@ hugo gen man [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_import.md b/content/en/commands/hugo_import.md index 70b182902..ad4907d58 100644 --- a/content/en/commands/hugo_import.md +++ b/content/en/commands/hugo_import.md @@ -13,6 +13,10 @@ Import your site from other web site generators like Jekyll. Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_path`. +``` +hugo import [command] [flags] +``` + ### Options ``` @@ -26,7 +30,9 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_import_jekyll.md b/content/en/commands/hugo_import_jekyll.md index ff0ff549b..10d603bdf 100644 --- a/content/en/commands/hugo_import_jekyll.md +++ b/content/en/commands/hugo_import_jekyll.md @@ -10,11 +10,11 @@ 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] +hugo import jekyll [flags] [args] ``` ### Options @@ -31,7 +31,9 @@ hugo import jekyll [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_list.md b/content/en/commands/hugo_list.md index e2854c568..10a8cf6cb 100644 --- a/content/en/commands/hugo_list.md +++ b/content/en/commands/hugo_list.md @@ -11,30 +11,36 @@ Listing out various types of content Listing out various types of content. -List requires a subcommand, e.g. `hugo list drafts`. +List requires a subcommand, e.g. hugo list drafts + +``` +hugo list [command] [flags] +``` ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -e, --environment string build environment - -h, --help help for list - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -s, --source string filesystem path to read files relative from - --themesDir string filesystem path to themes directory + -h, --help help for list ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_list_all.md b/content/en/commands/hugo_list_all.md index a6f9f94d6..8edd0a4d9 100644 --- a/content/en/commands/hugo_list_all.md +++ b/content/en/commands/hugo_list_all.md @@ -12,7 +12,7 @@ List all posts List all of the posts in your content directory, include drafts, future and expired pages. ``` -hugo list all [flags] +hugo list all [flags] [args] ``` ### Options @@ -28,7 +28,9 @@ hugo list all [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_list_drafts.md b/content/en/commands/hugo_list_drafts.md index 98c8a047c..5ec870a5d 100644 --- a/content/en/commands/hugo_list_drafts.md +++ b/content/en/commands/hugo_list_drafts.md @@ -12,7 +12,7 @@ List all drafts List all of the drafts in your content directory. ``` -hugo list drafts [flags] +hugo list drafts [flags] [args] ``` ### Options @@ -28,7 +28,9 @@ hugo list drafts [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_list_expired.md b/content/en/commands/hugo_list_expired.md index 89c10d501..3feae5640 100644 --- a/content/en/commands/hugo_list_expired.md +++ b/content/en/commands/hugo_list_expired.md @@ -12,7 +12,7 @@ List all posts already expired List all of the posts in your content directory which has already expired. ``` -hugo list expired [flags] +hugo list expired [flags] [args] ``` ### Options @@ -28,7 +28,9 @@ hugo list expired [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_list_future.md b/content/en/commands/hugo_list_future.md index ca15b7673..5b331b90b 100644 --- a/content/en/commands/hugo_list_future.md +++ b/content/en/commands/hugo_list_future.md @@ -12,7 +12,7 @@ List all posts dated in the future List all of the posts in your content directory which will be posted in the future. ``` -hugo list future [flags] +hugo list future [flags] [args] ``` ### Options @@ -28,7 +28,9 @@ hugo list future [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod.md b/content/en/commands/hugo_mod.md index 1df6df78e..8621f30dd 100644 --- a/content/en/commands/hugo_mod.md +++ b/content/en/commands/hugo_mod.md @@ -10,7 +10,6 @@ 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". @@ -26,53 +25,27 @@ See https://gohugo.io/hugo-modules/ for more information. ### Options ``` - -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --cleanDestinationDir remove files from destination not found in static directories - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disableKinds strings disable different kind of pages (home, RSS etc.) - --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages - -e, --environment string build environment - --forceSyncStatic copy all files when static is changed. - --gc enable to run some cleanup tasks (remove unused cache files) after the build - -h, --help help for mod - --ignoreCache ignores the cache directory - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -l, --layoutDir string filesystem path to layout directory - --minify minify any supported output format (HTML, XML etc.) - --noBuildLock don't create .hugo_build.lock file - --noChmod don't sync permission mode of files - --noTimes don't sync modification time of files - --panicOnWarning panic on first WARNING log - --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes - --printI18nWarnings print missing translations - --printMemoryUsage print memory usage to screen at intervals - --printPathWarnings print warnings on duplicate target paths etc. - --printUnusedTemplates print warnings on unused templates. - -s, --source string filesystem path to read files relative from - --templateMetrics display metrics about template executions - --templateMetricsHints calculate some improvement hints when combined with --templateMetrics - -t, --theme strings themes to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --trace file write trace to file (not useful in general) + -h, --help help for mod ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_mod_clean.md b/content/en/commands/hugo_mod_clean.md index b13b7c020..922fab2ab 100644 --- a/content/en/commands/hugo_mod_clean.md +++ b/content/en/commands/hugo_mod_clean.md @@ -11,14 +11,8 @@ Delete the Hugo Module cache for the current project. 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] +hugo mod clean [flags] [args] ``` ### Options @@ -36,7 +30,9 @@ hugo mod clean [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_get.md b/content/en/commands/hugo_mod_get.md index 54eaa74de..d0d0f85d3 100644 --- a/content/en/commands/hugo_mod_get.md +++ b/content/en/commands/hugo_mod_get.md @@ -38,7 +38,7 @@ See https://gohugo.io/hugo-modules/ for more information. ``` -hugo mod get [flags] +hugo mod get [flags] [args] ``` ### Options @@ -54,7 +54,9 @@ hugo mod get [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_graph.md b/content/en/commands/hugo_mod_graph.md index ba8898a69..da72a2a31 100644 --- a/content/en/commands/hugo_mod_graph.md +++ b/content/en/commands/hugo_mod_graph.md @@ -14,13 +14,14 @@ Note that for vendored modules, that is the version listed and not the one from ``` -hugo mod graph [flags] +hugo mod graph [flags] [args] ``` ### Options ``` - -h, --help help for graph + --clean delete module cache for dependencies that fail verification + -h, --help help for graph ``` ### Options inherited from parent commands @@ -30,7 +31,9 @@ hugo mod graph [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_init.md b/content/en/commands/hugo_mod_init.md index 21aacf131..7d5f77aa7 100644 --- a/content/en/commands/hugo_mod_init.md +++ b/content/en/commands/hugo_mod_init.md @@ -10,16 +10,16 @@ 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. - + 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] +hugo mod init [flags] [args] ``` ### Options @@ -35,7 +35,9 @@ hugo mod init [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_npm.md b/content/en/commands/hugo_mod_npm.md index 0a9a43869..12ec71b77 100644 --- a/content/en/commands/hugo_mod_npm.md +++ b/content/en/commands/hugo_mod_npm.md @@ -12,7 +12,7 @@ Various npm helpers. Various npm (Node package manager) helpers. ``` -hugo mod npm [flags] +hugo mod npm [command] [flags] ``` ### Options @@ -28,7 +28,9 @@ hugo mod npm [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_npm_pack.md b/content/en/commands/hugo_mod_npm_pack.md index 597b039de..b923db82c 100644 --- a/content/en/commands/hugo_mod_npm_pack.md +++ b/content/en/commands/hugo_mod_npm_pack.md @@ -22,7 +22,7 @@ so this may/will change in future versions of Hugo. ``` -hugo mod npm pack [flags] +hugo mod npm pack [flags] [args] ``` ### Options @@ -38,7 +38,9 @@ hugo mod npm pack [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_tidy.md b/content/en/commands/hugo_mod_tidy.md index 68279cf9b..63cb52ca6 100644 --- a/content/en/commands/hugo_mod_tidy.md +++ b/content/en/commands/hugo_mod_tidy.md @@ -8,7 +8,7 @@ url: /commands/hugo_mod_tidy/ Remove unused entries in go.mod and go.sum. ``` -hugo mod tidy [flags] +hugo mod tidy [flags] [args] ``` ### Options @@ -24,7 +24,9 @@ hugo mod tidy [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_vendor.md b/content/en/commands/hugo_mod_vendor.md index 1dab295ca..9d9943c8a 100644 --- a/content/en/commands/hugo_mod_vendor.md +++ b/content/en/commands/hugo_mod_vendor.md @@ -10,12 +10,11 @@ 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. - + If a module is vendored, that is where Hugo will look for it's dependencies. + ``` -hugo mod vendor [flags] +hugo mod vendor [flags] [args] ``` ### Options @@ -31,7 +30,9 @@ hugo mod vendor [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_mod_verify.md b/content/en/commands/hugo_mod_verify.md index 7ffab453e..dd41f29fd 100644 --- a/content/en/commands/hugo_mod_verify.md +++ b/content/en/commands/hugo_mod_verify.md @@ -11,9 +11,8 @@ Verify dependencies. 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] +hugo mod verify [flags] [args] ``` ### Options @@ -30,7 +29,9 @@ hugo mod verify [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/commands/hugo_new.md b/content/en/commands/hugo_new.md index e0f58247b..dd170eee5 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -19,67 +19,39 @@ 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] +hugo new [command] [flags] ``` ### Options ``` - -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --cleanDestinationDir remove files from destination not found in static directories - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disableKinds strings disable different kind of pages (home, RSS etc.) - --editor string edit new content with this editor, if provided - --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages - -e, --environment string build environment - -f, --force overwrite file if it already exists - --forceSyncStatic copy all files when static is changed. - --gc enable to run some cleanup tasks (remove unused cache files) after the build - -h, --help help for new - --ignoreCache ignores the cache directory - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -k, --kind string content type to create - -l, --layoutDir string filesystem path to layout directory - --minify minify any supported output format (HTML, XML etc.) - --noBuildLock don't create .hugo_build.lock file - --noChmod don't sync permission mode of files - --noTimes don't sync modification time of files - --panicOnWarning panic on first WARNING log - --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes - --printI18nWarnings print missing translations - --printMemoryUsage print memory usage to screen at intervals - --printPathWarnings print warnings on duplicate target paths etc. - --printUnusedTemplates print warnings on unused templates. - -s, --source string filesystem path to read files relative from - --templateMetrics display metrics about template executions - --templateMetricsHints calculate some improvement hints when combined with --templateMetrics - -t, --theme strings themes to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --trace file write trace to file (not useful in general) + -h, --help help for new ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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](/commands/hugo/) - hugo builds your site +* [hugo new content](/commands/hugo_new_content/) - Create new content for your site * [hugo new site](/commands/hugo_new_site/) - Create a new site (skeleton) -* [hugo new theme](/commands/hugo_new_theme/) - Create a new theme +* [hugo new theme](/commands/hugo_new_theme/) - Create a new site (skeleton) diff --git a/content/en/commands/hugo_new_content.md b/content/en/commands/hugo_new_content.md new file mode 100644 index 000000000..e26fa9459 --- /dev/null +++ b/content/en/commands/hugo_new_content.md @@ -0,0 +1,57 @@ +--- +title: "hugo new content" +slug: hugo_new_content +url: /commands/hugo_new_content/ +--- +## hugo new content + +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 content [path] [flags] +``` + +### Options + +``` + --editor string edit new content with this editor, if provided + -f, --force overwrite file if it already exists + -h, --help help for content + -k, --kind string content type to create +``` + +### Options inherited from parent commands + +``` + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 new](/commands/hugo_new/) - Create new content for your site + diff --git a/content/en/commands/hugo_new_site.md b/content/en/commands/hugo_new_site.md index e594a9979..803127de3 100644 --- a/content/en/commands/hugo_new_site.md +++ b/content/en/commands/hugo_new_site.md @@ -20,27 +20,28 @@ hugo new site [path] [flags] ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -e, --environment string build environment - --force init inside non-empty directory - -f, --format string config file format (default "toml") - -h, --help help for site - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -s, --source string filesystem path to read files relative from - --themesDir string filesystem path to themes directory + --force init inside non-empty directory + -h, --help help for site ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_new_theme.md b/content/en/commands/hugo_new_theme.md index 48c374d98..b1f1ea3ee 100644 --- a/content/en/commands/hugo_new_theme.md +++ b/content/en/commands/hugo_new_theme.md @@ -5,41 +5,42 @@ url: /commands/hugo_new_theme/ --- ## hugo new theme -Create a new theme +Create a new site (skeleton) ### Synopsis -Create a new theme (skeleton) called [name] in ./themes. -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. +Create a new site in the provided directory. +The new site will have the correct structure, but no content or theme yet. +Use `hugo new [contentPath]` to create new content. ``` -hugo new theme [name] [flags] +hugo new theme [path] [flags] ``` ### Options ``` - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -e, --environment string build environment - -h, --help help for theme - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -s, --source string filesystem path to read files relative from - --themesDir string filesystem path to themes directory + -h, --help help for theme ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_server.md b/content/en/commands/hugo_server.md index f80bd496e..657a4eee4 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -23,73 +23,74 @@ and push the latest content to them. As most Hugo sites are built in a fraction of a second, you will be able to save and see your changes nearly instantly. ``` -hugo server [flags] +hugo server [flags] [args] ``` ### Options ``` - --appendPort append port to baseURL (default true) - -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ - --bind string interface to which the server will bind (default "127.0.0.1") - -D, --buildDrafts include content marked as draft - -E, --buildExpired include expired content - -F, --buildFuture include content with publishdate in the future - --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ - --cleanDestinationDir remove files from destination not found in static directories - --clock string set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00 - -c, --contentDir string filesystem path to content directory - -d, --destination string filesystem path to write files to - --disableBrowserError do not show build errors in the browser - --disableFastRender enables full re-renders on changes - --disableKinds strings disable different kind of pages (home, RSS etc.) - --disableLiveReload watch without enabling live browser reload on rebuild - --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages - -e, --environment string build environment - --forceSyncStatic copy all files when static is changed. - --gc enable to run some cleanup tasks (remove unused cache files) after the build - -h, --help help for server - --ignoreCache ignores the cache directory - --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern - -l, --layoutDir string filesystem path to layout directory - --liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1) - --meminterval string interval to poll memory usage (requires --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default "100ms") - --memstats string log memory usage to this file - --minify minify any supported output format (HTML, XML etc.) - --navigateToChanged navigate to changed content file on live browser reload - --noBuildLock don't create .hugo_build.lock file - --noChmod don't sync permission mode of files - --noHTTPCache prevent HTTP caching - --noTimes don't sync modification time of files - --panicOnWarning panic on first WARNING log - --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes - -p, --port int port on which the server will listen (default 1313) - --printI18nWarnings print missing translations - --printMemoryUsage print memory usage to screen at intervals - --printPathWarnings print warnings on duplicate target paths etc. - --printUnusedTemplates print warnings on unused templates. - --renderStaticToDisk serve static files from disk and dynamic files from memory - --renderToDisk serve all files from disk (default is from memory) - -s, --source string filesystem path to read files relative from - --templateMetrics display metrics about template executions - --templateMetricsHints calculate some improvement hints when combined with --templateMetrics - -t, --theme strings themes to use (located in /themes/THEMENAME/) - --themesDir string filesystem path to themes directory - --trace file write trace to file (not useful in general) - -w, --watch watch filesystem for changes and recreate as needed (default true) + --appendPort append port to baseURL (default true) + -b, --baseURL string hostname (and path) to the root, e.g. https://spf13.com/ + --bind string interface to which the server will bind (default "127.0.0.1") + -D, --buildDrafts include content marked as draft + -E, --buildExpired include expired content + -F, --buildFuture include content with publishdate in the future + --cacheDir string filesystem path to cache directory. Defaults: $TMPDIR/hugo_cache/ + --cleanDestinationDir remove files from destination not found in static directories + -c, --contentDir string filesystem path to content directory + --disableBrowserError do not show build errors in the browser + --disableFastRender enables full re-renders on changes + --disableKinds strings disable different kind of pages (home, RSS etc.) + --disableLiveReload watch without enabling live browser reload on rebuild + --enableGitInfo add Git revision, date, author, and CODEOWNERS info to the pages + --forceSyncStatic copy all files when static is changed. + --gc enable to run some cleanup tasks (remove unused cache files) after the build + -h, --help help for server + --ignoreCache ignores the cache directory + -l, --layoutDir string filesystem path to layout directory + --liveReloadPort int port for live reloading (i.e. 443 in HTTPS proxy situations) (default -1) + --meminterval string interval to poll memory usage (requires --memstats), valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h". (default "100ms") + --memstats string log memory usage to this file + --minify minify any supported output format (HTML, XML etc.) + --navigateToChanged navigate to changed content file on live browser reload + --noBuildLock don't create .hugo_build.lock file + --noChmod don't sync permission mode of files + --noHTTPCache prevent HTTP caching + --noTimes don't sync modification time of files + --panicOnWarning panic on first WARNING log + --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes + -p, --port int port on which the server will listen (default 1313) + --printI18nWarnings print missing translations + --printMemoryUsage print memory usage to screen at intervals + --printPathWarnings print warnings on duplicate target paths etc. + --printUnusedTemplates print warnings on unused templates. + --renderStaticToDisk serve static files from disk and dynamic files from memory + --renderToDisk serve all files from disk (default is from memory) + --templateMetrics display metrics about template executions + --templateMetricsHints calculate some improvement hints when combined with --templateMetrics + -t, --theme strings themes to use (located in /themes/THEMENAME/) + --trace file write trace to file (not useful in general) + -w, --watch watch filesystem for changes and recreate as needed (default true) ``` ### Options inherited from parent commands ``` - --config string config file (default is hugo.yaml|json|toml) - --configDir string config dir (default "config") - --debug debug output - --log enable Logging - --logFile string log File path (if set, logging enabled automatically) - --quiet build in quiet mode - -v, --verbose verbose output - --verboseLog verbose logging + --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") + --debug debug output + -d, --destination string filesystem path to write files to + -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") + --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern + --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 diff --git a/content/en/commands/hugo_version.md b/content/en/commands/hugo_version.md index bdef5bbd4..35b720153 100644 --- a/content/en/commands/hugo_version.md +++ b/content/en/commands/hugo_version.md @@ -5,14 +5,14 @@ url: /commands/hugo_version/ --- ## hugo version -Print the version number of Hugo +Print Hugo version and environment info ### Synopsis -All software has versions. This is Hugo's. +Print Hugo version and environment info. This is useful in Hugo bug reports. ``` -hugo version [flags] +hugo version [flags] [args] ``` ### Options @@ -28,7 +28,9 @@ hugo version [flags] --config string config file (default is hugo.yaml|json|toml) --configDir string config dir (default "config") --debug debug output + -d, --destination string filesystem path to write files to -e, --environment string build environment + --format string preferred file format (toml, yaml or json) (default "toml") --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern --log enable Logging --logFile string log File path (if set, logging enabled automatically) diff --git a/content/en/content-management/cross-references.md b/content/en/content-management/cross-references.md index 00fb2d973..a2b3f8e1c 100644 --- a/content/en/content-management/cross-references.md +++ b/content/en/content-management/cross-references.md @@ -139,7 +139,7 @@ produces this HTML: ## Ref and RelRef Configuration -The behavior can, since Hugo 0.45, be configured in `config.toml`: +The behavior can, since Hugo 0.45, be configured in `hugo.toml`: refLinksErrorLevel ("ERROR") : When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this log level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`). diff --git a/content/en/content-management/front-matter.md b/content/en/content-management/front-matter.md index 78d3323dd..062288320 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -135,7 +135,7 @@ weight : Field name of the *plural* form of the index. See `tags` and `categories` in the above front matter examples. *Note that the plural form of user-defined taxonomies cannot be the same as any of the predefined front matter variables.* {{% note %}} -If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site `config` file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors. +If neither `slug` nor `url` is present and [permalinks are not configured otherwise in your site configuration file](/content-management/urls/#permalinks), Hugo will use the filename of your content to create the output URL. See [Content Organization](/content-management/organization) for an explanation of paths in Hugo and [URL Management](/content-management/urls/) for ways to customize Hugo's default behaviors. {{% /note %}} ### User-Defined diff --git a/content/en/content-management/image-processing/index.md b/content/en/content-management/image-processing/index.md index 0043f97b0..3d70951b3 100644 --- a/content/en/content-management/image-processing/index.md +++ b/content/en/content-management/image-processing/index.md @@ -384,7 +384,7 @@ Note the self-closing shortcode syntax above. You may call the `imgproc` shortco Define an `imaging` section in your site configuration to set the default [image processing options](#image-processing-options). -{{< code-toggle file="config" copy=true >}} +{{< code-toggle file="hugo" copy=true >}} [imaging] resampleFilter = "Box" quality = 75 @@ -412,7 +412,7 @@ resampleFilter Define an `imaging.exif` section in your site configuration to control the availability of Exif data. -{{< code-toggle file="config" copy=true >}} +{{< code-toggle file="hugo" copy=true >}} [imaging.exif] includeFields = "" excludeFields = "" diff --git a/content/en/content-management/menus.md b/content/en/content-management/menus.md index 369938aba..07bf41669 100644 --- a/content/en/content-management/menus.md +++ b/content/en/content-management/menus.md @@ -36,7 +36,7 @@ Although you can use these methods in combination when defining a menu, the menu To automatically define menu entries for each top-level section of your site, enable the section pages menu in your site configuration. -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} sectionPagesMenu = "main" {{< /code-toggle >}} @@ -111,7 +111,7 @@ Access the entry with `site.Menus.main` in your templates. See [menu templates] To define entries for the "main" menu: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] name = 'Home' pageRef = '/' @@ -132,7 +132,7 @@ This creates a menu structure that you can access with `site.Menus.main` in your To define entries for the "footer" menu: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.footer]] name = 'Terms' pageRef = '/terms' @@ -177,7 +177,7 @@ url This nested menu demonstrates some of the available properties: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] name = 'Products' pageRef = '/products' diff --git a/content/en/content-management/multilingual.md b/content/en/content-management/multilingual.md index f1f25086a..71adc214d 100644 --- a/content/en/content-management/multilingual.md +++ b/content/en/content-management/multilingual.md @@ -21,7 +21,7 @@ Also See [Hugo Multilingual Part 1: Content translation]. The following is an example of a site configuration for a multilingual Hugo project: -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} defaultContentLanguage = "en" copyright = "Everything is mine" @@ -73,10 +73,10 @@ Only the obvious non-global options can be overridden per language. Examples of {{< new-in "0.112.0" >}} -In version `0.112.0` of Hugo we did a major we consolidated all configuration options, but also improved how the languages and their params gets merged with the main configuration. But while testing this on Hugo sites out there, we got some error reports. +In Hugo `v0.112.0` we consolidated all configuration options, and improved how the languages and their parameters are merged with the main configuration. But while testing this on Hugo sites out there, we received some error reports and reverted some of the changes in favor of deprecation warnings: 1. `site.Language.Params` is deprecated. Use `site.Params` directly. -1. The `params` sections on site and language is the only place to put custom user parameters, and `site.Params` will only contain these user defined parameters (see example below). +1. Adding custom params to the top level language config is deprecated, add all of these below `[params]`, see `color` in the example below. ```toml title = "My blog" @@ -90,7 +90,7 @@ languageCode = "sv" color = "blue" ``` -In the example above, all the settings exept the `color` below `params` maps to predefined configuration options in Hguo for the site and its language, and should be accessed via the documented accessors: +In the example above, all settings except `color` below `params` map to predefined configuration options in Hugo for the site and its language, and should be accessed via the documented accessors: ``` {{ site.Title }} @@ -102,7 +102,7 @@ In the example above, all the settings exept the `color` below `params` maps to You can disable one or more languages. This can be useful when working on a new translation. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} disableLanguages = ["fr", "ja"] {{< /code-toggle >}} @@ -114,7 +114,7 @@ We kept this as a standalone setting to make it easier to set via [OS environmen HUGO_DISABLELANGUAGES="fr ja" hugo ``` -If you have already a list of disabled languages in `config.toml`, you can enable them in development like this: +If you have already a list of disabled languages in `hugo.toml`, you can enable them in development like this: ```bash HUGO_DISABLELANGUAGES=" " hugo server @@ -132,7 +132,7 @@ If a `baseURL` is set on the `language` level, then all languages must have one Example: -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} [languages] [languages.fr] baseURL = "https://example.fr" @@ -194,7 +194,7 @@ If a file has no language code, it will be assigned the default language. This system uses different content directories for each of the languages. Each language's content directory is set using the `contentDir` param. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} languages: en: weight: 10 @@ -400,7 +400,7 @@ In case you need to pass a custom data: (`(dict "Count" numeric_value_only)` is The following localization examples assume your site's primary language is English, with translations to French and German. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} defaultContentLanguage = 'en' [languages] @@ -522,7 +522,7 @@ The `identifier` depends on how you define menu entries: For example, if you define menu entries in site configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [[menu.main]] identifier = 'products' name = 'Products' @@ -551,7 +551,7 @@ services = 'Leistungen' For example: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [languages.de] languageCode = 'de-DE' languageName = 'Deutsch' diff --git a/content/en/content-management/page-resources.md b/content/en/content-management/page-resources.md index 4bbd159be..54494c2e1 100644 --- a/content/en/content-management/page-resources.md +++ b/content/en/content-management/page-resources.md @@ -78,7 +78,7 @@ MediaType.MainType : The main type of the resource's MIME type. For example, a file of MIME type `application/pdf` has for MainType `application`. MediaType.SubType -: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension - PowerPoint files have a subtype of `vnd.mspowerpoint`. +: The subtype of the resource's MIME type. For example, a file of MIME type `application/pdf` has for SubType `pdf`. Note that this is not the same as the file extension. For example, Microsoft PowerPoint files (`.ppt`) have a subtype of `vnd.ms-powerpoint`. MediaType.Suffixes : A slice of possible suffixes for the resource's MIME type. diff --git a/content/en/content-management/related.md b/content/en/content-management/related.md index 823e3035c..e80c0f06b 100644 --- a/content/en/content-management/related.md +++ b/content/en/content-management/related.md @@ -66,7 +66,7 @@ We improved and simplified this feature in Hugo 0.111.0. Before this we had 3 di Hugo can index the headings in your content and use this to find related content. You can enable this by adding a index of type `fragments` to your `related` configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [related] threshold = 20 includeNewer = true @@ -113,7 +113,7 @@ Hugo provides a sensible default configuration of Related Content, but you can f Without any `related` configuration set on the project, Hugo's Related Content methods will use the following. -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} related: threshold: 80 includeNewer: false diff --git a/content/en/content-management/shortcodes.md b/content/en/content-management/shortcodes.md index f91adc227..b2c98fc65 100644 --- a/content/en/content-management/shortcodes.md +++ b/content/en/content-management/shortcodes.md @@ -116,6 +116,9 @@ height width : `width` attribute of the image. +loading +: `loading` attribute of the image. + attr : Image attribution text. Markdown within the value of `attr` will be rendered. @@ -222,7 +225,7 @@ You must obtain an Access Token to use the `instagram` shortcode. If your site configuration is private: -{{< code-toggle file=config copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [services.instagram] accessToken = 'xxx' {{< /code-toggle >}} diff --git a/content/en/content-management/static-files.md b/content/en/content-management/static-files.md index 6bff7fd6f..ddc35da36 100644 --- a/content/en/content-management/static-files.md +++ b/content/en/content-management/static-files.md @@ -28,7 +28,7 @@ This union filesystem will be served from your site root. So a file Here's an example of setting `staticDir` and `staticDir2` for a multi-language site: -{{< code-toggle copy=false file="config" >}} +{{< code-toggle copy=false file="hugo" >}} staticDir = ["static1", "static2"] [languages] diff --git a/content/en/content-management/taxonomies.md b/content/en/content-management/taxonomies.md index fe42a0667..a532e1873 100644 --- a/content/en/content-management/taxonomies.md +++ b/content/en/content-management/taxonomies.md @@ -82,7 +82,7 @@ Hugo natively supports taxonomies. Without adding a single line to your [site config][config] file, Hugo will automatically create taxonomies for `tags` and `categories`. That would be the same as manually [configuring your taxonomies](#configure-taxonomies) as below: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -90,7 +90,7 @@ Without adding a single line to your [site config][config] file, Hugo will autom If you do not want Hugo to create any taxonomies, set `disableKinds` in your [site config][config] to the following: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} disableKinds = ["taxonomy","term"] {{ code-toggle >}} @@ -113,7 +113,7 @@ Custom taxonomies other than the [defaults](#default-taxonomies) must be defined While adding custom taxonomies, you need to put in the default taxonomies too, _if you want to keep them_. {{% /note %}} -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" category = "categories" @@ -124,7 +124,7 @@ While adding custom taxonomies, you need to put in the default taxonomies too, _ If you want to have just the default `tags` taxonomy, and remove the `categories` taxonomy for your site, you can do so by modifying the `taxonomies` value in your [site config][config]. -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [taxonomies] tag = "tags" {{ code-toggle >}} diff --git a/content/en/content-management/urls.md b/content/en/content-management/urls.md index c65d6c15a..48de64966 100644 --- a/content/en/content-management/urls.md +++ b/content/en/content-management/urls.md @@ -110,7 +110,7 @@ content/ Create a date-based hierarchy, recursively, for regular pages within the `posts` section: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] posts = '/posts/:year/:month/:title/' {{< /code-toggle >}} @@ -133,7 +133,7 @@ public/ To create a date-based hierarchy for regular pages in the content root: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] '/' = '/:year/:month/:title/' {{< /code-toggle >}} @@ -144,7 +144,7 @@ A URL pattern defined for the content root is not recursive. Use the same approach with taxonomies. For example, to omit the taxonomy segment of the URL: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} [permalinks] 'tags' = '/:title/' {{< /code-toggle >}} @@ -198,7 +198,7 @@ For time-related values, you can also use the layout string components defined i [time package]: https://pkg.go.dev/time#pkg-constants -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} permalinks: posts: /:06/:1/:2/:title/ {{< /code-toggle >}} @@ -214,7 +214,7 @@ pretty|content/about.md|`https://example.org/about/` By default, Hugo produces pretty URLs. To generate ugly URLs, change your site configuration: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} uglyURLs = true {{< /code-toggle >}} @@ -241,7 +241,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} canonifyURLs = true {{< /code-toggle >}} @@ -264,7 +264,7 @@ This is an imperfect, brute force approach that can affect content as well as HT To enable: -{{< code-toggle file="config" copy=false >}} +{{< code-toggle file="hugo" copy=false >}} relativeURLs = true {{< /code-toggle >}} diff --git a/content/en/contribute/documentation.md b/content/en/contribute/documentation.md index b1fed4cb2..4583f7cf4 100644 --- a/content/en/contribute/documentation.md +++ b/content/en/contribute/documentation.md @@ -128,7 +128,7 @@ fm #### Site configuration example ```text -{{* code-toggle file="config" */>}} +{{* code-toggle file="hugo" */>}} baseURL = 'https://example.org' languageCode = 'en-US' title = "Example Site" @@ -137,7 +137,7 @@ title = "Example Site" Rendered: -{{< code-toggle file="config" >}} +{{< code-toggle file="hugo" >}} baseURL = 'https://example.org' languageCode = 'en-US' title = "Example Site" diff --git a/content/en/functions/hasPrefix.md b/content/en/functions/hasPrefix.md new file mode 100644 index 000000000..cf29315e2 --- /dev/null +++ b/content/en/functions/hasPrefix.md @@ -0,0 +1,21 @@ +--- +title: hasprefix +linktitle: hasPrefix +description: Tests whether a string begins with prefix. +date: 2017-02-01 +publishdate: 2017-02-01 +lastmod: 2017-02-01 +categories: [functions] +menu: + docs: + parent: "functions" +keywords: [strings] +signature: ["hasPrefix STRING PREFIX"] +workson: [] +hugoversion: +relatedfuncs: [hasSuffix] +deprecated: false +aliases: [] +--- + +* `{{ hasPrefix "Hugo" "Hu" }}` → true diff --git a/content/en/functions/hasSuffix.md b/content/en/functions/hasSuffix.md new file mode 100644 index 000000000..9906cc2c3 --- /dev/null +++ b/content/en/functions/hasSuffix.md @@ -0,0 +1,21 @@ +--- +title: hassuffix +linktitle: hasSuffix +description: Tests whether a string ends with suffix. +date: 2023-03-01 +publishdate: 2023-03-01 +lastmod: 2023-03-01 +categories: [functions] +menu: +docs: +parent: "functions" +keywords: [strings] +signature: ["hasSuffix STRING SUFFIX"] +workson: [] +hugoversion: +relatedfuncs: [hasPrefix] +deprecated: false +aliases: [] +--- + +* `{{ hasSuffix "Hugo" "go" }}` → true \ No newline at end of file diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md index 998c71c37..78d658c66 100644 --- a/content/en/functions/hugo.md +++ b/content/en/functions/hugo.md @@ -13,32 +13,35 @@ relatedfuncs: [] `hugo` returns an instance that contains the following functions: -hugo.Generator -: `` tag for the version of Hugo that generated the site. `hugo.Generator` outputs a *complete* HTML tag; e.g. `` +`hugo.BuildDate` +: (`string`) The compile date of the current Hugo binary formatted per [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339) (e.g., `2023-05-23T08:14:20Z`). -hugo.Version -: the current version of the Hugo binary you are using e.g. `0.99.1` +`hugo.CommitHash` +: (`string`) The Git commit hash of the Hugo binary (e.g., `0a95d6704a8ac8d41cc5ca8fffaad8c5c7a3754a`). -hugo.GoVersion -: returns the version of Go that the Hugo binary was built with. {{< new-in "0.101.0" >}} +`hugo.Deps` +: (`[]*hugo.Dependency`) See [hugo.Deps](#hugodeps). -hugo.Environment -: the current running environment as defined through the `--environment` cli tag +`hugo.Environment` +: (`string`) The current running environment as defined through the `--environment` CLI flag (e.g., `development`, `production`). -hugo.CommitHash -: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247` +`hugo.Generator` +: (`template.HTML`) Renders an HTML `meta` element identifying the software that generated the site (e.g., ``). -hugo.BuildDate -: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00` +`hugo.GoVersion` +: (`string`) The Go version used to compile the Hugo binary (e.g., `go1.20.4`). {{< new-in "0.101.0" >}} -hugo.IsExtended -: whether this is the extended Hugo binary. +`hugo.IsExtended` +: (`bool`) Returns `true` if the Hugo binary is the extended version. -hugo.IsProduction -: returns true if `hugo.Environment` is set to the production environment +`hugo.IsProduction` +: (`bool`) Returns `true` if `hugo.Environment` is set to the production environment. -hugo.Deps -: See [hugo.Deps](#hugodeps) +`hugo.Version` +: (`hugo.VersionString`) The current version of the Hugo binary (e.g., `0.112.1`). + +`hugo.WorkingDir` +: (`string`) The project working directory (e.g., `/home/user/projects/my-hugo-site`). {{< new-in "0.112.0" >}} ## hugo.Deps @@ -48,28 +51,28 @@ hugo.Deps Each dependency contains: -Path (string) -: Returns the path to this module. This will either be the module path, e.g. "github.com/gohugoio/myshortcodes", or the path below your /theme folder, e.g. "mytheme". - -Version (string) -: The module version. - -Vendor (bool) -: Whether this dependency is vendored. - -Time (time.Time) -: Time version was created. - Owner -: In the dependency tree, this is the first module that defines this module as a dependency. +: (`*hugo.Dependency`) In the dependency tree, this is the first module that defines this module as a dependency (e.g., `github.com/gohugoio/hugo-mod-bootstrap-scss/v5`). -Replace (*Dependency) -: Replaced by this dependency. +Path +: (`string`) The module path or the path below your `themes` directory (e.g., `github.com/gohugoio/hugo-mod-jslibs-dist/popperjs/v2`). + +Replace +: (`*hugo.Dependency`) Replaced by this dependency. + +Time +: (`time.Time`) The time that the version was created (e.g., `2022-02-13 15:11:28 +0000 UTC`). + +Vendor +: (`bool`) Returns `true` if the dependency is vendored. + +Version +: (`string`) The module version (e.g., `v2.21100.20000`). An example table listing the dependencies: ```html -