mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
ab21433689
Fixes #11638
25 lines
No EOL
656 B
Text
25 lines
No EOL
656 B
Text
|
|
|
|
hugo -e info --logLevel info
|
|
stdout 'INFO item was deprecated in Hugo'
|
|
|
|
hugo -e warn --logLevel warn
|
|
stdout 'WARN item was deprecated in Hugo'
|
|
|
|
! hugo -e error --logLevel warn
|
|
stdout 'ERROR 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 }} |