aboutsummaryrefslogtreecommitdiffhomepage
path: root/testscripts/commands/deprecate.txt
blob: b15d7ec841ec13cb5284dba621267b887292ecac (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


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