mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-14 20:37:55 -05:00
4d38f47250
To make theme easier to spot, esp. on INFO level.
25 lines
No EOL
716 B
Text
25 lines
No EOL
716 B
Text
|
|
# Test deprecation logging.
|
|
hugo -e info --logLevel info
|
|
stdout 'INFO deprecated: item was deprecated in Hugo'
|
|
|
|
hugo -e warn --logLevel warn
|
|
stdout 'WARN deprecated: item was deprecated in Hugo'
|
|
|
|
! hugo -e error --logLevel warn
|
|
stdout 'ERROR deprecated: item was deprecated in Hugo'
|
|
|
|
-- hugo.toml --
|
|
baseURL = "https://example.com/"
|
|
disableKinds = ["taxonomy", "term"]
|
|
-- layouts/index.html --
|
|
Deprecate:
|
|
{{ if eq hugo.Environment "info" }}
|
|
{{ debug.TestDeprecationInfo "item" "alternative" }}
|
|
{{ end }}
|
|
{{ if eq hugo.Environment "warn" }}
|
|
{{ debug.TestDeprecationWarn "item" "alternative" }}
|
|
{{ end }}
|
|
{{ if eq hugo.Environment "error" }}
|
|
{{ debug.TestDeprecationErr "item" "alternative" }}
|
|
{{ end }} |