aboutsummaryrefslogtreecommitdiffhomepage
path: root/testscripts/commands/deprecate.txt
blob: 8791c3a78748a2af7666de721ed082ab75cb8442 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# Test deprecation logging.
hugo -e info --logLevel info
stderr 'INFO  deprecated: item was deprecated in Hugo'

hugo -e warn --logLevel warn
stderr 'WARN  deprecated: item was deprecated in Hugo'

! hugo -e error --logLevel warn
stderr '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 }}