hugo/testscripts/commands/deprecate.txt
2023-10-31 10:42:23 +01:00

25 lines
656 B
Plaintext

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