From 230a495941b191af0bdaa7e2fc8c61607cb38207 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Mon, 14 Feb 2022 12:58:42 +0100 Subject: [PATCH] Squashed 'docs/' changes from b8b20e9a2..93f7baf80 93f7baf80 netlify: Hugo 0.92.2 ecd8a6b6b Merge branch 'tempv0.92.2' ee04caf9f Fix validation of Page Kind in cascade target map 3fce03ed2 Remove the "check" command 70ad71b25 Fix typo (#1651) dfd1dc570 Fix internal link (#1650) b5e0e0d38 Update rotten Fedora package link 78276390a Add missing word in types.md (#1645) 45eb945f8 Remove hugo gen autocomplete 2f84d0896 netlify: Hugo 0.92.1 b55f5773b Update complement.md 7013ee43e Remove deprecated RSSLink from page variables 1c3fb6ed3 Remove deprecated page vars (#1638) 9bd0af3ab Update union.md 4576487a0 Update symdiff.md 58f1b26c7 Update starter-kits.md (#1521) 285356c1d Move inline partials section (#1635) 4d08625d2 Improve directions for editing Win 10 path env var (#1632) 41d9c7804 Update page content (#1629) d05536cad Removed unpaired quote character (#1630) 3b0fdcd88 netlify: Bump to Hugo 0.92.0 cdb068346 docs: Regenerate docshelper 778503ca8 Merge commit 'a8e9fc699a6ff7d578f97a7c553ce844efad8fdb' 2d2401c91 docs: Add dependency table to maintainance page 6bc95c386 Add hugo.Deps 19d0b5e23 docs. Regen CLI docs 76a750d96 docs: Regenerate CLI docs 70156962a docs: Regenerate docshelper git-subtree-dir: docs git-subtree-split: 93f7baf80bd03176ad44701cd2452433d492ea0b --- content/en/about/security-model/index.md | 8 +-- content/en/commands/hugo.md | 3 +- content/en/commands/hugo_check.md | 38 ---------- content/en/commands/hugo_check_ulimit.md | 46 ------------ content/en/commands/hugo_completion.md | 1 - content/en/commands/hugo_completion_bash.md | 1 - content/en/commands/hugo_completion_fish.md | 1 - .../en/commands/hugo_completion_powershell.md | 1 - content/en/commands/hugo_completion_zsh.md | 1 - content/en/commands/hugo_config.md | 1 - content/en/commands/hugo_config_mounts.md | 1 - content/en/commands/hugo_convert.md | 1 - content/en/commands/hugo_convert_toJSON.md | 1 - content/en/commands/hugo_convert_toTOML.md | 1 - content/en/commands/hugo_convert_toYAML.md | 1 - content/en/commands/hugo_deploy.md | 1 - content/en/commands/hugo_env.md | 1 - content/en/commands/hugo_gen.md | 2 - content/en/commands/hugo_gen_autocomplete.md | 59 --------------- content/en/commands/hugo_gen_chromastyles.md | 1 - content/en/commands/hugo_gen_doc.md | 1 - content/en/commands/hugo_gen_man.md | 1 - content/en/commands/hugo_import.md | 1 - content/en/commands/hugo_import_jekyll.md | 1 - content/en/commands/hugo_list.md | 1 - content/en/commands/hugo_list_all.md | 1 - content/en/commands/hugo_list_drafts.md | 1 - content/en/commands/hugo_list_expired.md | 1 - content/en/commands/hugo_list_future.md | 1 - content/en/commands/hugo_mod.md | 4 +- content/en/commands/hugo_mod_clean.md | 1 - content/en/commands/hugo_mod_get.md | 3 +- content/en/commands/hugo_mod_graph.md | 1 - content/en/commands/hugo_mod_init.md | 1 - content/en/commands/hugo_mod_npm.md | 1 - content/en/commands/hugo_mod_npm_pack.md | 1 - content/en/commands/hugo_mod_tidy.md | 1 - content/en/commands/hugo_mod_vendor.md | 1 - content/en/commands/hugo_mod_verify.md | 1 - content/en/commands/hugo_new.md | 2 +- content/en/commands/hugo_new_site.md | 3 +- content/en/commands/hugo_new_theme.md | 1 - content/en/commands/hugo_server.md | 2 +- content/en/commands/hugo_version.md | 1 - content/en/content-management/front-matter.md | 2 +- content/en/content-management/types.md | 2 +- content/en/functions/complement.md | 2 +- content/en/functions/hugo.md | 65 +++++++++++++++++ content/en/functions/symdiff.md | 2 +- content/en/functions/union.md | 2 +- content/en/getting-started/installing.md | 14 ++-- content/en/hugo-modules/configuration.md | 2 +- content/en/templates/data-templates.md | 2 +- content/en/templates/partials.md | 72 ++++++++++--------- content/en/tools/starter-kits.md | 8 --- content/en/variables/hugo.md | 49 ------------- content/en/variables/page.md | 12 ---- data/docs.json | 48 +++++++++++++ layouts/maintenance/list.html | 34 ++++++++- netlify.toml | 8 +-- 60 files changed, 209 insertions(+), 318 deletions(-) delete mode 100644 content/en/commands/hugo_check.md delete mode 100644 content/en/commands/hugo_check_ulimit.md delete mode 100644 content/en/commands/hugo_gen_autocomplete.md delete mode 100644 content/en/variables/hugo.md diff --git a/content/en/about/security-model/index.md b/content/en/about/security-model/index.md index 0aec5556..c7e9d35c 100644 --- a/content/en/about/security-model/index.md +++ b/content/en/about/security-model/index.md @@ -25,7 +25,7 @@ But when developing and building your site, the runtime is the `hugo` executable * Hugo has a virtual file system and only the main project (not third-party components) is allowed to mount directories or files outside the project root. * Only the main project can walk symbolic links. -* User-defined components have only read-access to the filesystem. +* User-defined components have read-only access to the filesystem. * We shell out to some external binaries to support [Asciidoctor](/content-management/formats/#list-of-content-formats) and similar, but those binaries and their flags are predefined and disabled by default (see [Security Policy](#security-policy)). General functions to run arbitrary external OS commands have been [discussed](https://github.com/gohugoio/hugo/issues/796), but not implemented because of security concerns. @@ -35,7 +35,7 @@ But when developing and building your site, the runtime is the `hugo` executable Hugo has a built-in security policy that restricts access to [os/exec](https://pkg.go.dev/os/exec), remote communication and similar. -The default configuration is listed below. And build using features not whitelisted in the security policy will faill with a detailed message about what needs to be done. Most of these settings are whitelists (string or slice, [Regular Expressions](https://pkg.go.dev/regexp) or `none` which matches nothing). +The default configuration is listed below. Any build using features not in the allow list of the security policy will fail with a detailed message about what needs to be done. Most of these settings are allow lists (string or slice, [Regular Expressions](https://pkg.go.dev/regexp) or `none` which matches nothing). {{< code-toggle config="security" />}} @@ -47,9 +47,9 @@ HUGO_SECURITY_HTTP_URLS=none hugo ## Dependency Security -Hugo builds as a static binary using [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. Go Modules have several safeguards, one of them being the `go.sum` file. This is a database of the expected cryptographic checksums of all of your dependencies, including any transitive. +Hugo is built as a static binary using [Go Modules](https://github.com/golang/go/wiki/Modules) to manage its dependencies. Go Modules have several safeguards, one of them being the `go.sum` file. This is a database of the expected cryptographic checksums of all of your dependencies, including transitive dependencies. -[Hugo Modules](/hugo-modules/) is built on top of Go Modules functionality, and a Hugo project using Hugo Modules will have a `go.sum` file. We recommend that you commit this file to your version control system. The Hugo build will fail if there is a checksum mismatch, which would be an indication of [dependency tampering](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/). +[Hugo Modules](/hugo-modules/) is a feature built on top of the functionality of Go Modules. Like Go Modules, a Hugo project using Hugo Modules will have a `go.sum` file. We recommend that you commit this file to your version control system. The Hugo build will fail if there is a checksum mismatch, which would be an indication of [dependency tampering](https://julienrenaux.fr/2019/12/20/github-actions-security-risk/). ## Web Application Security diff --git a/content/en/commands/hugo.md b/content/en/commands/hugo.md index 00d60be0..827bb89e 100644 --- a/content/en/commands/hugo.md +++ b/content/en/commands/hugo.md @@ -42,7 +42,6 @@ hugo [flags] -h, --help help for hugo --i18n-warnings print missing translations --ignoreCache ignores the cache directory - --ignoreVendor ignores any _vendor directory --ignoreVendorPaths string ignores any _vendor for module paths matching the given Glob pattern -l, --layoutDir string filesystem path to layout directory --log enable Logging @@ -50,6 +49,7 @@ hugo [flags] --minify minify any supported output format (HTML, XML etc.) --noChmod don't sync permission mode of files --noTimes don't sync modification time of files + --panicOnWarning panic on first WARNING log --path-warnings print warnings on duplicate target paths etc. --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --print-mem print memory usage to screen at intervals @@ -68,7 +68,6 @@ hugo [flags] ### SEE ALSO -* [hugo check](/commands/hugo_check/) - Contains some verification checks * [hugo completion](/commands/hugo_completion/) - generate the autocompletion script for the specified shell * [hugo config](/commands/hugo_config/) - Print the site configuration * [hugo convert](/commands/hugo_convert/) - Convert your content to different formats diff --git a/content/en/commands/hugo_check.md b/content/en/commands/hugo_check.md deleted file mode 100644 index 1c9bb0c9..00000000 --- a/content/en/commands/hugo_check.md +++ /dev/null @@ -1,38 +0,0 @@ ---- -title: "hugo check" -slug: hugo_check -url: /commands/hugo_check/ ---- -## hugo check - -Contains some verification checks - -### Options - -``` - -h, --help help for check -``` - -### 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 - --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 check ulimit](/commands/hugo_check_ulimit/) - Check system ulimit settings - diff --git a/content/en/commands/hugo_check_ulimit.md b/content/en/commands/hugo_check_ulimit.md deleted file mode 100644 index a27bd683..00000000 --- a/content/en/commands/hugo_check_ulimit.md +++ /dev/null @@ -1,46 +0,0 @@ ---- -title: "hugo check ulimit" -slug: hugo_check_ulimit -url: /commands/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 - --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 check](/commands/hugo_check/) - Contains some verification checks - diff --git a/content/en/commands/hugo_completion.md b/content/en/commands/hugo_completion.md index fdcb008b..944021d0 100644 --- a/content/en/commands/hugo_completion.md +++ b/content/en/commands/hugo_completion.md @@ -27,7 +27,6 @@ See each sub-command's help for details on how to use the generated script. --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 5ff7c0ad..4d5a6927 100644 --- a/content/en/commands/hugo_completion_bash.md +++ b/content/en/commands/hugo_completion_bash.md @@ -45,7 +45,6 @@ hugo completion bash --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 aab77bfa..0d238741 100644 --- a/content/en/commands/hugo_completion_fish.md +++ b/content/en/commands/hugo_completion_fish.md @@ -39,7 +39,6 @@ hugo completion fish [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 dc8aadc3..ab45bbcc 100644 --- a/content/en/commands/hugo_completion_powershell.md +++ b/content/en/commands/hugo_completion_powershell.md @@ -37,7 +37,6 @@ hugo completion powershell [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 b3062b7a..06fb7507 100644 --- a/content/en/commands/hugo_completion_zsh.md +++ b/content/en/commands/hugo_completion_zsh.md @@ -44,7 +44,6 @@ hugo completion zsh [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 e305e68d..eb82b06e 100644 --- a/content/en/commands/hugo_config.md +++ b/content/en/commands/hugo_config.md @@ -28,7 +28,6 @@ hugo config [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_mounts.md b/content/en/commands/hugo_config_mounts.md index f12ec8df..76592620 100644 --- a/content/en/commands/hugo_config_mounts.md +++ b/content/en/commands/hugo_config_mounts.md @@ -24,7 +24,6 @@ hugo config mounts [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 df67d3c1..68650621 100644 --- a/content/en/commands/hugo_convert.md +++ b/content/en/commands/hugo_convert.md @@ -28,7 +28,6 @@ See convert's subcommands toJSON, toTOML and toYAML for more information. --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_toJSON.md b/content/en/commands/hugo_convert_toJSON.md index a6840bbf..b055529c 100644 --- a/content/en/commands/hugo_convert_toJSON.md +++ b/content/en/commands/hugo_convert_toJSON.md @@ -29,7 +29,6 @@ hugo convert toJSON [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 522af07b..cc98e3e3 100644 --- a/content/en/commands/hugo_convert_toTOML.md +++ b/content/en/commands/hugo_convert_toTOML.md @@ -29,7 +29,6 @@ hugo convert toTOML [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 656556d3..fd3c3c08 100644 --- a/content/en/commands/hugo_convert_toYAML.md +++ b/content/en/commands/hugo_convert_toYAML.md @@ -29,7 +29,6 @@ hugo convert toYAML [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 41ae5d45..336bd034 100644 --- a/content/en/commands/hugo_deploy.md +++ b/content/en/commands/hugo_deploy.md @@ -38,7 +38,6 @@ hugo deploy [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_env.md b/content/en/commands/hugo_env.md index c5919b24..3fad2ace 100644 --- a/content/en/commands/hugo_env.md +++ b/content/en/commands/hugo_env.md @@ -31,7 +31,6 @@ hugo env [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 84ec7ecb..55fb1f2b 100644 --- a/content/en/commands/hugo_gen.md +++ b/content/en/commands/hugo_gen.md @@ -20,7 +20,6 @@ A collection of several useful generators. --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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) @@ -34,7 +33,6 @@ A collection of several useful generators. ### SEE ALSO * [hugo](/commands/hugo/) - hugo builds your site -* [hugo gen autocomplete](/commands/hugo_gen_autocomplete/) - Generate shell autocompletion script for Hugo * [hugo gen chromastyles](/commands/hugo_gen_chromastyles/) - Generate CSS stylesheet for the Chroma code highlighter * [hugo gen doc](/commands/hugo_gen_doc/) - Generate Markdown documentation for the Hugo CLI. * [hugo gen man](/commands/hugo_gen_man/) - Generate man pages for the Hugo CLI diff --git a/content/en/commands/hugo_gen_autocomplete.md b/content/en/commands/hugo_gen_autocomplete.md deleted file mode 100644 index 7d2d4fd6..00000000 --- a/content/en/commands/hugo_gen_autocomplete.md +++ /dev/null @@ -1,59 +0,0 @@ ---- -title: "hugo gen autocomplete" -slug: hugo_gen_autocomplete -url: /commands/hugo_gen_autocomplete/ ---- -## hugo gen autocomplete - -Generate shell autocompletion script for Hugo - -### Synopsis - -Generates a shell autocompletion script for Hugo. - -The script is written to the console (stdout). - -To write to file, add the `--completionfile=/path/to/file` flag. - -Add `--type={bash, zsh, fish or powershell}` flag to set alternative -shell type. - -Logout and in again to reload the completion scripts, -or just source them in directly: - - $ . /etc/bash_completion or /path/to/file - -``` -hugo gen autocomplete [flags] -``` - -### Options - -``` - -f, --completionfile string autocompletion file, defaults to stdout - -h, --help help for autocomplete - -t, --type string autocompletion type (bash, zsh, fish, or powershell) (default "bash") -``` - -### 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 - --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 gen](/commands/hugo_gen/) - A collection of several useful generators. - diff --git a/content/en/commands/hugo_gen_chromastyles.md b/content/en/commands/hugo_gen_chromastyles.md index 2c24abca..c032056b 100644 --- a/content/en/commands/hugo_gen_chromastyles.md +++ b/content/en/commands/hugo_gen_chromastyles.md @@ -33,7 +33,6 @@ hugo gen chromastyles [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 8c17b594..158f3728 100644 --- a/content/en/commands/hugo_gen_doc.md +++ b/content/en/commands/hugo_gen_doc.md @@ -35,7 +35,6 @@ hugo gen doc [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 9aef9ab8..e39a9799 100644 --- a/content/en/commands/hugo_gen_man.md +++ b/content/en/commands/hugo_gen_man.md @@ -31,7 +31,6 @@ hugo gen man [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 1170b3b1..24cf2954 100644 --- a/content/en/commands/hugo_import.md +++ b/content/en/commands/hugo_import.md @@ -26,7 +26,6 @@ Import requires a subcommand, e.g. `hugo import jekyll jekyll_root_path target_p --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 f1d811fe..08f97fb4 100644 --- a/content/en/commands/hugo_import_jekyll.md +++ b/content/en/commands/hugo_import_jekyll.md @@ -31,7 +31,6 @@ hugo import jekyll [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 7f70ccb0..ed5836fe 100644 --- a/content/en/commands/hugo_list.md +++ b/content/en/commands/hugo_list.md @@ -26,7 +26,6 @@ List requires a subcommand, e.g. `hugo list drafts`. --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_all.md b/content/en/commands/hugo_list_all.md index 1a52f3f3..1bc26e79 100644 --- a/content/en/commands/hugo_list_all.md +++ b/content/en/commands/hugo_list_all.md @@ -28,7 +28,6 @@ hugo list all [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 0de7b096..5a59db50 100644 --- a/content/en/commands/hugo_list_drafts.md +++ b/content/en/commands/hugo_list_drafts.md @@ -28,7 +28,6 @@ hugo list drafts [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 71e938da..85c78632 100644 --- a/content/en/commands/hugo_list_expired.md +++ b/content/en/commands/hugo_list_expired.md @@ -28,7 +28,6 @@ hugo list expired [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 b723ee00..0c2b3b6c 100644 --- a/content/en/commands/hugo_list_future.md +++ b/content/en/commands/hugo_list_future.md @@ -28,7 +28,6 @@ hugo list future [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 044cff1a..7b620cd3 100644 --- a/content/en/commands/hugo_mod.md +++ b/content/en/commands/hugo_mod.md @@ -16,7 +16,7 @@ This is not needed if you only operate on modules inside /themes or if you have 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), +configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided), Go Modules, or a folder inside the themes directory, in that order. See https://gohugo.io/hugo-modules/ for more information. @@ -45,6 +45,7 @@ See https://gohugo.io/hugo-modules/ for more information. --minify minify any supported output format (HTML, XML etc.) --noChmod don't sync permission mode of files --noTimes don't sync modification time of files + --panicOnWarning panic on first WARNING log --path-warnings print warnings on duplicate target paths etc. --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --print-mem print memory usage to screen at intervals @@ -61,7 +62,6 @@ See https://gohugo.io/hugo-modules/ for more information. --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_clean.md b/content/en/commands/hugo_mod_clean.md index 81caa6c9..e8a86d3f 100644 --- a/content/en/commands/hugo_mod_clean.md +++ b/content/en/commands/hugo_mod_clean.md @@ -36,7 +36,6 @@ hugo mod clean [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 f2f9cff0..d63e380a 100644 --- a/content/en/commands/hugo_mod_get.md +++ b/content/en/commands/hugo_mod_get.md @@ -30,7 +30,7 @@ Install the latest versions of all module dependencies: Run "go help get" for more information. All flags available for "go get" is also relevant here. 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), +configuration, provided by a _vendor directory (if no --ignoreVendorPaths flag provided), Go Modules, or a folder inside the themes directory, in that order. See https://gohugo.io/hugo-modules/ for more information. @@ -54,7 +54,6 @@ hugo mod get [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 af8b01fa..6889a282 100644 --- a/content/en/commands/hugo_mod_graph.md +++ b/content/en/commands/hugo_mod_graph.md @@ -30,7 +30,6 @@ hugo mod graph [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 a7a569d3..824973d4 100644 --- a/content/en/commands/hugo_mod_init.md +++ b/content/en/commands/hugo_mod_init.md @@ -35,7 +35,6 @@ hugo mod init [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 5d000870..db38fd2d 100644 --- a/content/en/commands/hugo_mod_npm.md +++ b/content/en/commands/hugo_mod_npm.md @@ -28,7 +28,6 @@ hugo mod npm [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 809c3a5b..cde0c452 100644 --- a/content/en/commands/hugo_mod_npm_pack.md +++ b/content/en/commands/hugo_mod_npm_pack.md @@ -38,7 +38,6 @@ hugo mod npm pack [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 925def7c..76dcd8e1 100644 --- a/content/en/commands/hugo_mod_tidy.md +++ b/content/en/commands/hugo_mod_tidy.md @@ -24,7 +24,6 @@ hugo mod tidy [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 2d18951f..cde46591 100644 --- a/content/en/commands/hugo_mod_vendor.md +++ b/content/en/commands/hugo_mod_vendor.md @@ -31,7 +31,6 @@ hugo mod vendor [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 cd9b1cbf..07924529 100644 --- a/content/en/commands/hugo_mod_verify.md +++ b/content/en/commands/hugo_mod_verify.md @@ -30,7 +30,6 @@ hugo mod verify [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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 4c49d11c..018cd2af 100644 --- a/content/en/commands/hugo_new.md +++ b/content/en/commands/hugo_new.md @@ -46,6 +46,7 @@ hugo new [path] [flags] --minify minify any supported output format (HTML, XML etc.) --noChmod don't sync permission mode of files --noTimes don't sync modification time of files + --panicOnWarning panic on first WARNING log --path-warnings print warnings on duplicate target paths etc. --poll string set this to a poll interval, e.g --poll 700ms, to use a poll based approach to watch for file system changes --print-mem print memory usage to screen at intervals @@ -62,7 +63,6 @@ hugo new [path] [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_site.md b/content/en/commands/hugo_new_site.md index 60e58b1b..250e5b79 100644 --- a/content/en/commands/hugo_new_site.md +++ b/content/en/commands/hugo_new_site.md @@ -21,7 +21,7 @@ hugo new site [path] [flags] ``` --force init inside non-empty directory - -f, --format string config & frontmatter format (default "toml") + -f, --format string config file format (default "toml") -h, --help help for site ``` @@ -32,7 +32,6 @@ hugo new site [path] [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_theme.md b/content/en/commands/hugo_new_theme.md index 3563f5b7..0908f01e 100644 --- a/content/en/commands/hugo_new_theme.md +++ b/content/en/commands/hugo_new_theme.md @@ -31,7 +31,6 @@ hugo new theme [name] [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_server.md b/content/en/commands/hugo_server.md index d801054d..524340f8 100644 --- a/content/en/commands/hugo_server.md +++ b/content/en/commands/hugo_server.md @@ -58,6 +58,7 @@ hugo server [flags] --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 --path-warnings print warnings on duplicate target paths etc. --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) @@ -77,7 +78,6 @@ hugo server [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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_version.md b/content/en/commands/hugo_version.md index f17671ae..8d3a65dd 100644 --- a/content/en/commands/hugo_version.md +++ b/content/en/commands/hugo_version.md @@ -28,7 +28,6 @@ hugo version [flags] --configDir string config dir (default "config") --debug debug output -e, --environment string build environment - --ignoreVendor ignores any _vendor directory --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/front-matter.md b/content/en/content-management/front-matter.md index 2155f199..6986f067 100644 --- a/content/en/content-management/front-matter.md +++ b/content/en/content-management/front-matter.md @@ -184,7 +184,7 @@ path : A [Glob](https://github.com/gobwas/glob) pattern matching the content path below /content. Expects Unix-styled slashes. Note that this is the virtual path, so it starts at the mount root. The matching support double-asterisks so you can match for patterns like `/blog/*/**` to match anything from the third level and down. kind -: The Page's Kind, e.g. "section". +: A Glob pattern matching the Page's Kind(s), e.g. "{home,section}". lang : A Glob pattern matching the Page's language, e.g. "{en,sv}". diff --git a/content/en/content-management/types.md b/content/en/content-management/types.md index 6be16b40..da45302a 100644 --- a/content/en/content-management/types.md +++ b/content/en/content-management/types.md @@ -14,7 +14,7 @@ aliases: [/content/types] toc: true --- -A **content type** is a way to organize your content. Hugo resolves the content type from either the `type` in front matter or, if not set, the first directory in the file path. E.g. `content/blog/my-first-event.md` will be of type `blog` if no `type` set. +A **content type** is a way to organize your content. Hugo resolves the content type from either the `type` in front matter or, if not set, the first directory in the file path. E.g. `content/blog/my-first-event.md` will be of type `blog` if no `type` is set. A content type is used to diff --git a/content/en/functions/complement.md b/content/en/functions/complement.md index 46122778..a41faf52 100644 --- a/content/en/functions/complement.md +++ b/content/en/functions/complement.md @@ -15,7 +15,7 @@ aliases: [] Example: ```go-html-template -{{ $pages := .Site.RegularPages | first 50 }} +{{ $pages := site.RegularPages | first 50 }} {{ $news := where $pages "Type" "news" | first 5 }} {{ $blog := where $pages "Type" "blog" | first 5 }} {{ $other := $pages | complement $news $blog | first 10 }} diff --git a/content/en/functions/hugo.md b/content/en/functions/hugo.md index 6cbb3601..7602a2e3 100644 --- a/content/en/functions/hugo.md +++ b/content/en/functions/hugo.md @@ -49,3 +49,68 @@ hugo.IsProduction {{% note "Use the Hugo Generator Tag" %}} We highly recommend using `hugo.Generator` in your website's ``. `hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](https://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo. {{% /note %}} + +hugo.Deps +: See [hugo.Deps](#hugodeps) + + +## hugo.Deps + +{{< new-in "0.92.0" >}} + +`hugo.Deps` returns a list of dependencies for a project (either Hugo Modules or local theme components). + +Eeach 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. + +Replace (*Dependency) +: Replaced by this dependency. + +An example table listing the dependencies: + +```html +

Dependencies

+ + + + + + + + + + + + + {{ range $index, $element := hugo.Deps }} + + + + + + + + + {{ end }} + +
#OwnerPathVersionTimeVendor
{{ add $index 1 }}{{ with $element.Owner }}{{.Path }}{{ end }} + {{ $element.Path }} + {{ with $element.Replace}} + => {{ .Path }} + {{ end }} + {{ $element.Version }}{{ with $element.Time }}{{ . }}{{ end }}{{ $element.Vendor }}
+``` \ No newline at end of file diff --git a/content/en/functions/symdiff.md b/content/en/functions/symdiff.md index b47bd26c..da269a42 100644 --- a/content/en/functions/symdiff.md +++ b/content/en/functions/symdiff.md @@ -6,7 +6,7 @@ categories: [functions] menu: docs: parent: "functions" -keywords: [collections,intersect,union, complement] +keywords: [collections,intersect,union,complement] signature: ["COLLECTION | symdiff COLLECTION" ] hugoversion: "0.51" aliases: [] diff --git a/content/en/functions/union.md b/content/en/functions/union.md index bf2a302d..459e3620 100644 --- a/content/en/functions/union.md +++ b/content/en/functions/union.md @@ -9,7 +9,7 @@ categories: [functions] menu: docs: parent: "functions" -keywords: [filtering,lists] +keywords: [collections,intersect,union,complement] signature: ["union SET1 SET2"] workson: [] hugoversion: 0.20 diff --git a/content/en/getting-started/installing.md b/content/en/getting-started/installing.md index c9ac5c33..2a9b8fa4 100644 --- a/content/en/getting-started/installing.md +++ b/content/en/getting-started/installing.md @@ -393,18 +393,12 @@ Now you need to add Hugo to your Windows PATH settings: * Right click on the **Start** button. * Click on **System**. -* Click on **Advanced System Settings** on the left. +* Click on **Advanced System Settings** on the right. * Click on the **Environment Variables...** button on the bottom. -* In the User variables section, find the row that starts with PATH (PATH will be all caps). -* Double-click on **PATH**. -* Click the **New...** button. -* Type in the folder where `hugo.exe` was extracted, which is `C:\Hugo\bin` if you went by the instructions above. *The PATH entry should be the folder where Hugo lives and not the binary.* Press Enter when you're done typing. +* In the User variables section, select the row labeled "Path" and click the **Edit...** button. +* Click the **Browse...** button and select the directory to which `hugo.exe` was extracted, which is `C:\Hugo\bin` if you went by the instructions above. *The path entry should be the folder where Hugo lives and not the binary itself.* * Click OK at every window to exit. -{{% note "Path Editor in Windows 10"%}} -The path editor in Windows 10 was added in the large [November 2015 Update](https://blogs.windows.com/windowsexperience/2015/11/12/first-major-update-for-windows-10-available-today/). You'll need to have that or a later update installed for the above steps to work. You can see what Windows 10 build you have by clicking on the  Start button → Settings → System → About. See [here](https://www.howtogeek.com/236195/how-to-find-out-which-build-and-version-of-windows-10-you-have/) for more.) -{{% /note %}} - #### For Windows 7 and 8.x users: Windows 7 and 8.1 do not include the easy path editor included in Windows 10, so non-technical users on those platforms are advised to install a free third-party path editor like [Windows Environment Variables Editor][Windows Environment Variables Editor] or [Path Editor](https://patheditor2.codeplex.com/). @@ -506,7 +500,7 @@ sudo pacman -Syu hugo ### Fedora, Red Hat and CentOS -Fedora maintains an [official package for Hugo](https://apps.fedoraproject.org/packages/hugo) which may be installed with: +Fedora maintains an [official package for Hugo](https://packages.fedoraproject.org/pkgs/hugo/hugo) which may be installed with: sudo dnf install hugo diff --git a/content/en/hugo-modules/configuration.md b/content/en/hugo-modules/configuration.md index 9b94061e..fc57f774 100644 --- a/content/en/hugo-modules/configuration.md +++ b/content/en/hugo-modules/configuration.md @@ -42,7 +42,7 @@ private : Comma separated glob list matching paths that should be treated as private. replacements {{< new-in "0.77.0" >}} -: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `"github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed. +: A comma separated (or a slice) list of module path to directory replacement mapping, e.g. `github.com/bep/myprettytheme -> ../..,github.com/bep/shortcodes -> /some/path`. This is mostly useful for temporary locally development of a module, and then it makes sense to set it as an OS environment variable, e.g: `env HUGO_MODULE_REPLACEMENTS="github.com/bep/myprettytheme -> ../.."`. Any relative path is relate to [themesDir](https://gohugo.io/getting-started/configuration/#all-configuration-settings), and absolute paths are allowed. Note that the above terms maps directly to their counterparts in Go Modules. Some of these setting may be natural to set as OS environment variables. To set the proxy server to use, as an example: diff --git a/content/en/templates/data-templates.md b/content/en/templates/data-templates.md index cb3de7f9..b5a29302 100644 --- a/content/en/templates/data-templates.md +++ b/content/en/templates/data-templates.md @@ -207,7 +207,7 @@ Currently, you can only use those authentication methods that can be put into an To load local files with `getJSON` and `getCSV`, the source files must reside within Hugo's working directory. The file extension does not matter, but the content does. -It applies the same output logic as above in [Call the Functions with a URL](#call-the-functions-with-a-url). +It applies the same output logic as above in [Get Remote Data](#get-remote-data). {{% note %}} The local CSV files to be loaded using `getCSV` must be located **outside** of the `data` directory. diff --git a/content/en/templates/partials.md b/content/en/templates/partials.md index a1030f6a..c80c2764 100644 --- a/content/en/templates/partials.md +++ b/content/en/templates/partials.md @@ -33,26 +33,25 @@ This allows a theme's end user to copy a partial's contents into a file of the s All partials for your Hugo project are located in a single `layouts/partials` directory. For better organization, you can create multiple subdirectories within `partials` as well: -``` -. -└── layouts - └── partials - ├── footer - │   ├── scripts.html - │   └── site-footer.html - ├── head - │   ├── favicons.html - │   ├── metadata.html - │   ├── prerender.html - │   └── twitter.html - └── header - ├── site-header.html - └── site-nav.html +```txt +layouts/ +└── partials/ + ├── footer/ + │ ├── scripts.html + │ └── site-footer.html + ├── head/ + │ ├── favicons.html + │ ├── metadata.html + │ ├── prerender.html + │ └── twitter.html + └── header/ + ├── site-header.html + └── site-nav.html ``` All partials are called within your templates using the following pattern: -``` +```go-html-template {{ partial "/.html" . }} ``` @@ -66,7 +65,7 @@ One of the most common mistakes with new Hugo users is failing to pass a context As shown in the above example directory structure, you can nest your directories within `partials` for better source organization. You only need to call the nested partial's path relative to the `partials` directory: -``` +```go-html-template {{ partial "header/site-header.html" . }} {{ partial "footer/scripts.html" . }} ``` @@ -81,22 +80,8 @@ This means the partial will *only* be able to access those variables. The partia In addition to outputting markup, partials can be used to return a value of any type. In order to return a value, a partial must include a lone `return` statement. -## Inline partials - -{{< new-in "0.74.0" >}} - -You can also define partials inline in the template. But remember that template namespace is global, so you need to make sure that the names are unique to avoid conflicts. - -```go-html-template -Value: {{ partial "my-inline-partial" . }} - -{{ define "partials/my-inline-partial" }} -{{ $value := 32 }} -{{ return $value }} -{{ end }} -``` - ### Example GetFeatured + ```go-html-template {{/* layouts/partials/GetFeatured.html */}} {{ return first . (where site.RegularPages "Params.featured" true) }} @@ -108,7 +93,9 @@ Value: {{ partial "my-inline-partial" . }} [...] {{ end }} ``` + ### Example GetImage + ```go-html-template {{/* layouts/partials/GetImage.html */}} {{ $image := false }} @@ -132,11 +119,26 @@ Value: {{ partial "my-inline-partial" . }} Only one `return` statement is allowed per partial file. {{% /note %}} +## Inline Partials + +{{< new-in "0.74.0" >}} + +You can also define partials inline in the template. But remember that template namespace is global, so you need to make sure that the names are unique to avoid conflicts. + +```go-html-template +Value: {{ partial "my-inline-partial" . }} + +{{ define "partials/my-inline-partial" }} +{{ $value := 32 }} +{{ return $value }} +{{ end }} +``` + ## Cached Partials The [`partialCached` template function][partialcached] can offer significant performance gains for complex templates that don't need to be re-rendered on every invocation. The simplest usage is as follows: -``` +```go-html-template {{ partialCached "footer.html" . }} ``` @@ -144,13 +146,13 @@ You can also pass additional parameters to `partialCached` to create *variants* For example, you can tell Hugo to only render the partial `footer.html` once per section: -``` +```go-html-template {{ partialCached "footer.html" . .Section }} ``` If you need to pass additional parameters to create unique variants, you can pass as many variant parameters as you need: -``` +```go-html-template {{ partialCached "footer.html" . .Params.country .Params.province }} ``` diff --git a/content/en/tools/starter-kits.md b/content/en/tools/starter-kits.md index e4255f98..9e10a813 100644 --- a/content/en/tools/starter-kits.md +++ b/content/en/tools/starter-kits.md @@ -24,22 +24,14 @@ The following starter kits are developed by active members of the Hugo community {{% /note %}} * [Hugo Wrapper][hugow]. Hugo Wrapper is a POSIX-style shell script which acts as a wrapper to download and run Hugo binary for your platform. It can be executed in variety of [Operating Systems][hugow-test] and [Command Shells][hugow-test]. -* [Victor Hugo][]. Victor Hugo is a Hugo boilerplate for creating truly epic websites using Webpack as an asset pipeline. Victor Hugo uses post-css and Babel for CSS and JavaScript, respectively, and is actively maintained. * [GOHUGO AMP][]. GoHugo AMP is a starter theme that aims to make it easy to adopt [Google's AMP Project][amp]. The starter kit comes with 40+ shortcodes and partials plus automatic structured data. The project also includes a [separate site with extensive documentation][gohugodocs]. -* [Blaupause][]. Blaupause is a developer-friendly Hugo starter kit based on Gulp tasks. It comes ES6-ready with several helpers for SVG and fonts and basic structure for HTML, SCSS, and JavaScript. -* [hugulp][]. hugulp is a tool to optimize the assets of a Hugo website. The main idea is to recreate the famous Ruby on Rails Asset Pipeline, which minifies, concatenates and fingerprints the assets used in your website. -* [Atlas][]. Atlas is a Hugo boilerplate designed to speed up development with support for Netlify, Hugo Pipes, SCSS & more. It's actively maintained and contributions are always welcome. * [Hyas][]. Hyas is a Hugo starter helping you build modern websites that are secure, fast, and SEO-ready — by default. It is Netlify-ready (functions, redirects, headers) and comes with [documentation](https://gethyas.com/) to easily make it your own. [addkit]: https://github.com/gohugoio/hugo/edit/master/docs/content/en/tools/starter-kits.md [amp]: https://amp.dev -[Blaupause]: https://github.com/fspoettel/blaupause [GOHUGO AMP]: https://github.com/wildhaber/gohugo-amp [gohugodocs]: https://gohugo-amp.gohugohq.com/ [hugow]: https://github.com/khos2ow/hugo-wrapper [hugow-test]: https://github.com/khos2ow/hugo-wrapper#tested-on -[hugulp]: https://github.com/jbrodriguez/hugulp -[Victor Hugo]: https://github.com/netlify/victor-hugo -[Atlas]: https://github.com/indigotree/atlas [Hyas]: https://github.com/h-enk/hyas diff --git a/content/en/variables/hugo.md b/content/en/variables/hugo.md deleted file mode 100644 index 7b1e6601..00000000 --- a/content/en/variables/hugo.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -title: Hugo-specific Variables -linktitle: Hugo Variables -description: The `.Hugo` variable provides easy access to Hugo-related data. -date: 2017-03-12 -publishdate: 2017-03-12 -lastmod: 2017-03-12 -categories: [variables and params] -keywords: [hugo,generator] -draft: false -menu: - docs: - parent: "variables" - weight: 60 -weight: 60 -sections_weight: 60 -aliases: [] -toc: false -wip: false ---- - -{{% warning "Deprecated" %}} -Page's `.Hugo` is deprecated and will be removed in a future release. Use the global `hugo` function. -For example: `hugo.Generator`. -{{% /warning %}} - -It contains the following fields: - -.Hugo.Generator -: `` tag for the version of Hugo that generated the site. `.Hugo.Generator` outputs a *complete* HTML tag; e.g. `` - -.Hugo.Version -: the current version of the Hugo binary you are using e.g. `0.13-DEV`
- -.Hugo.Environment -: the current running environment as defined through the `--environment` cli tag. - -.Hugo.CommitHash -: the git commit hash of the current Hugo binary e.g. `0e8bed9ccffba0df554728b46c5bbf6d78ae5247` - -.Hugo.BuildDate -: the compile date of the current Hugo binary formatted with RFC 3339 e.g. `2002-10-02T10:00:00-05:00`
- - - -{{% note "Use the Hugo Generator Tag" %}} -We highly recommend using `.Hugo.Generator` in your website's ``. `.Hugo.Generator` is included by default in all themes hosted on [themes.gohugo.io](https://themes.gohugo.io). The generator tag allows the Hugo team to track the usage and popularity of Hugo. -{{% /note %}} - diff --git a/content/en/variables/page.md b/content/en/variables/page.md index 79b1447f..b489bd9e 100644 --- a/content/en/variables/page.md +++ b/content/en/variables/page.md @@ -48,9 +48,6 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables. .Description : the description for the page. -.Dir -: the path of the folder containing this content file. The path is relative to the `content` folder. - .Draft : a boolean, `true` if the content is marked as a draft in the front matter. @@ -63,9 +60,6 @@ See [`.Scratch`](/functions/scratch/) for page-scoped, writable variables. .FuzzyWordCount : the approximate number of words in the content. -.Hugo -: see [Hugo Variables](/variables/hugo/). - .IsHome : `true` in the context of the [homepage](/templates/homepage/). @@ -132,9 +126,6 @@ See also `.ExpiryDate`, `.Date`, `.PublishDate`, and [`.GitInfo`][gitinfo]. .PublishDate : the date on which the content was or will be published; `.Publishdate` pulls from the `publishdate` field in a content's front matter. See also `.ExpiryDate`, `.Date`, and `.Lastmod`. -.RSSLink (deprecated) -: link to the page's RSS feed. This is deprecated. You should instead do something like this: `{{ with .OutputFormats.Get "RSS" }}{{ .RelPermalink }}{{ end }}`. - .RawContent : raw markdown content without the front matter. Useful with [remarkjs.com]( https://remarkjs.com) @@ -185,9 +176,6 @@ https://remarkjs.com) .Type : the [content type](/content-management/types/) of the content (e.g., `posts`). -.UniqueID (deprecated) -: the MD5-checksum of the content file's path. This variable is deprecated and will be removed, use `.File.UniqueID` instead. - .Weight : assigned weight (in the front matter) to this content, used in sorting. diff --git a/data/docs.json b/data/docs.json index b270b2c9..28a33c69 100644 --- a/data/docs.json +++ b/data/docs.json @@ -1915,6 +1915,20 @@ "" ] }, + { + "mainType": "application", + "subType": "pdf", + "delimiter": ".", + "firstSuffix": { + "suffix": "pdf", + "fullSuffix": ".pdf" + }, + "type": "application/pdf", + "string": "application/pdf", + "suffixes": [ + "pdf" + ] + }, { "mainType": "application", "subType": "rss", @@ -2015,6 +2029,34 @@ "ttf" ] }, + { + "mainType": "image", + "subType": "bmp", + "delimiter": ".", + "firstSuffix": { + "suffix": "bmp", + "fullSuffix": ".bmp" + }, + "type": "image/bmp", + "string": "image/bmp", + "suffixes": [ + "bmp" + ] + }, + { + "mainType": "image", + "subType": "gif", + "delimiter": ".", + "firstSuffix": { + "suffix": "gif", + "fullSuffix": ".gif" + }, + "type": "image/gif", + "string": "image/gif", + "suffixes": [ + "gif" + ] + }, { "mainType": "image", "subType": "jpeg", @@ -3819,6 +3861,12 @@ } }, "hugo": { + "Deps": { + "Description": "", + "Args": null, + "Aliases": null, + "Examples": null + }, "Generator": { "Description": "", "Args": null, diff --git a/layouts/maintenance/list.html b/layouts/maintenance/list.html index 50059ad9..ff573d54 100644 --- a/layouts/maintenance/list.html +++ b/layouts/maintenance/list.html @@ -7,7 +7,8 @@ @@ -30,6 +31,37 @@

Pages marked with TODO

{{ partial "maintenance-pages-table" (.Scratch.Get "todos") }} +

Dependencies

+ + + + + + + + + + + + + {{ range $index, $element := hugo.Deps }} + + + + + + + + + {{ end }} + +
#OwnerPathVersionTimeVendor
{{ add $index 1 }}{{ with $element.Owner }}{{.Path }}{{ end }} + {{ $element.Path }} + {{ with $element.Replace}} + => {{ .Path }} + {{ end }} + {{ $element.Version }}{{ with $element.Time }}{{ . }}{{ end }}{{ $element.Vendor }}
+ diff --git a/netlify.toml b/netlify.toml index a44e1f38..d8056f8f 100644 --- a/netlify.toml +++ b/netlify.toml @@ -3,7 +3,7 @@ publish = "public" command = "hugo --gc --minify" [context.production.environment] -HUGO_VERSION = "0.91.2" +HUGO_VERSION = "0.92.2" HUGO_ENV = "production" HUGO_ENABLEGITINFO = "true" @@ -11,20 +11,20 @@ HUGO_ENABLEGITINFO = "true" command = "hugo --gc --minify --enableGitInfo" [context.split1.environment] -HUGO_VERSION = "0.91.2" +HUGO_VERSION = "0.92.2" HUGO_ENV = "production" [context.deploy-preview] command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL" [context.deploy-preview.environment] -HUGO_VERSION = "0.91.2" +HUGO_VERSION = "0.92.2" [context.branch-deploy] command = "hugo --gc --minify -b $DEPLOY_PRIME_URL" [context.branch-deploy.environment] -HUGO_VERSION = "0.91.2" +HUGO_VERSION = "0.92.2" [context.next.environment] HUGO_ENABLEGITINFO = "true" -- 2.30.2