tpl: Do not return any value in errorf

Fixes #6653
This commit is contained in:
Bjørn Erik Pedersen
2019-12-21 10:26:14 +01:00
parent 1773d71d5b
commit 50cc7fe545
3 changed files with 6 additions and 6 deletions

View File

@@ -14,14 +14,14 @@ workson: []
hugoversion:
relatedfuncs: [printf]
deprecated: false
aliases: []
aliases: [/functions/errorf]
---
`errorf` or `warnf` will evaluate a format string, then output the result to the ERROR or WARNING log (and only once per error message to avoid flooding the log).
Any ERROR will also cause the build to fail (the `hugo` command will `exit -1`).
Note that the WARNING will only be printed to the console.
Both functions return an empty string, so the messages are only printed to the console.
```
{{ errorf "Failed to handle page %q" .Path }}