| 1 |
|
| 2 |
# Test deprecation logging. |
| 3 |
hugo -e info --logLevel info |
| 4 |
stderr 'INFO deprecated: item was deprecated in Hugo' |
| 5 |
|
| 6 |
hugo -e warn --logLevel warn |
| 7 |
stderr 'WARN deprecated: item was deprecated in Hugo' |
| 8 |
|
| 9 |
! hugo -e error --logLevel warn |
| 10 |
stderr 'ERROR deprecated: item was deprecated in Hugo' |
| 11 |
|
| 12 |
-- hugo.toml -- |
| 13 |
baseURL = "https://example.com/" |
| 14 |
disableKinds = ["taxonomy", "term"] |
| 15 |
-- layouts/home.html -- |
| 16 |
Deprecate: |
| 17 |
{{ if eq hugo.Environment "info" }} |
| 18 |
{{ debug.TestDeprecationInfo "item" "alternative" }} |
| 19 |
{{ end }} |
| 20 |
{{ if eq hugo.Environment "warn" }} |
| 21 |
{{ debug.TestDeprecationWarn "item" "alternative" }} |
| 22 |
{{ end }} |
| 23 |
{{ if eq hugo.Environment "error" }} |
| 24 |
{{ debug.TestDeprecationErr "item" "alternative" }} |
| 25 |
{{ end }} |