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
This commit is contained in:
Bjørn Erik Pedersen 2022-02-14 12:58:42 +01:00
parent a8e9fc699a
commit 230a495941
60 changed files with 209 additions and 318 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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

View file

@ -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.

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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)

View file

@ -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}".

View file

@ -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

View file

@ -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 }}

View file

@ -49,3 +49,68 @@ hugo.IsProduction
{{% note "Use the Hugo Generator Tag" %}}
We highly recommend using `hugo.Generator` in your website's `<head>`. `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
<h2>Dependencies</h2>
<table class="table table-dark">
<thead>
<tr>
<th scope="col">#</th>
<th scope="col">Owner</th>
<th scope="col">Path</th>
<th scope="col">Version</th>
<th scope="col">Time</th>
<th scope="col">Vendor</th>
</tr>
</thead>
<tbody>
{{ range $index, $element := hugo.Deps }}
<tr>
<th scope="row">{{ add $index 1 }}</th>
<td>{{ with $element.Owner }}{{.Path }}{{ end }}</td>
<td>
{{ $element.Path }}
{{ with $element.Replace}}
=> {{ .Path }}
{{ end }}
</td>
<td>{{ $element.Version }}</td>
<td>{{ with $element.Time }}{{ . }}{{ end }}</td>
<td>{{ $element.Vendor }}</td>
</tr>
{{ end }}
</tbody>
</table>
```

View file

@ -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

View file

@ -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 <kbd>Enter</kbd> 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 <i class="fa fa-windows"></i>&nbsp;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

View file

@ -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:

View file

@ -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.

View file

@ -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
```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 "<PATH>/<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 }}
```

View file

@ -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

View file

@ -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
: `<meta>` tag for the version of Hugo that generated the site. `.Hugo.Generator` outputs a *complete* HTML tag; e.g. `<meta name="generator" content="Hugo 0.18" />`
.Hugo.Version
: the current version of the Hugo binary you are using e.g. `0.13-DEV`<br>
.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`<br>
{{% note "Use the Hugo Generator Tag" %}}
We highly recommend using `.Hugo.Generator` in your website's `<head>`. `.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 %}}

View file

@ -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.

View file

@ -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,

View file

@ -8,6 +8,7 @@
<li><a href="#last-updated">Last Updated</a></li>
<li><a href="#least-recently-updated">Least Recently Updated</a></li>
<li><a href="#todos">Pages marked with TODO</a></li>
<li><a href="#dependencies">Project dependencies (Hugo Modules)</a></li>
</ul>
</aside>
</div>
@ -30,6 +31,37 @@
<h2 id="todos">Pages marked with TODO</h2>
{{ partial "maintenance-pages-table" (.Scratch.Get "todos") }}
<h2 id="dependencies">Dependencies</h2>
<table class="collapse ba br2 b--black-10 pv2 ph3">
<thead>
<tr>
<th class="pv2 ph3 tl f6 fw6 ttu">#</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Owner</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Path</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Version</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Time</th>
<th class="pv2 ph3 tl f6 fw6 ttu">Vendor</th>
</tr>
</thead>
<tbody>
{{ range $index, $element := hugo.Deps }}
<tr class="striped--light-gray">
<th class="pv2 ph3">{{ add $index 1 }}</th>
<td class="pv2 ph3">{{ with $element.Owner }}{{.Path }}{{ end }}</td>
<td class="pv2 ph3">
{{ $element.Path }}
{{ with $element.Replace}}
=> {{ .Path }}
{{ end }}
</td>
<td class="pv2 ph3">{{ $element.Version }}</td>
<td class="pv2 ph3">{{ with $element.Time }}{{ . }}{{ end }}</td>
<td class="pv2 ph3">{{ $element.Vendor }}</td>
</tr>
{{ end }}
</tbody>
</table>
</div>
</div>
</div>

View file

@ -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"