docs: Document refLinksErrorLevel and refLinksNotFoundURL

See #4964
This commit is contained in:
Bjørn Erik Pedersen 2018-07-19 15:03:35 +02:00
parent e25aa655f4
commit 00c74ee7ff
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F
2 changed files with 19 additions and 0 deletions

View file

@ -123,6 +123,19 @@ Few examples:
## Version 1.0 {#version-1-dot-0} ## Version 1.0 {#version-1-dot-0}
``` ```
## Ref and RelRef Configuration
The behaviour can, since Hugo 0.45, be configured in `config.toml`:
refLinksErrorLevel ("ERROR")
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
refLinksNotFoundURL
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
[built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes [built-in Hugo shortcodes]: /content-management/shortcodes/#using-the-built-in-shortcodes
[lists]: /templates/lists/ [lists]: /templates/lists/
[output formats]: /templates/output-formats/ [output formats]: /templates/output-formats/

View file

@ -183,6 +183,12 @@ related
relativeURLs (false) relativeURLs (false)
: Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs. : Enable this to make all relative URLs relative to content root. Note that this does not affect absolute URLs.
refLinksErrorLevel ("ERROR")
: When using `ref` or `relref` to resolve page links and a link cannot resolved, it will be logged with this logg level. Valid values are `ERROR` (default) or `WARNING`. Any `ERROR` will fail the build (`exit -1`).
refLinksNotFoundURL
: URL to be used as a placeholder when a page reference cannot be found in `ref` or `relref`. Is used as-is.
rssLimit (unlimited) rssLimit (unlimited)
: Maximum number of items in the RSS feed. : Maximum number of items in the RSS feed.