mirror of
https://github.com/gohugoio/hugo.git
synced 2025-04-29 07:00:31 +03:00
parent
23fcfb7f74
commit
ab21433689
5 changed files with 56 additions and 6 deletions
25
testscripts/commands/deprecate.txt
Normal file
25
testscripts/commands/deprecate.txt
Normal file
|
@ -0,0 +1,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 }}
|
Loading…
Add table
Add a link
Reference in a new issue