-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix deprecation printing on info level
Fixes #11638
- Loading branch information
Showing
5 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters