Skip to content

Commit 544f0a6

Browse files
committed
hugolib: The deprecated Extension, Now and TargetPath will now ERROR
1 parent 5794a26 commit 544f0a6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎hugolib/page.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ func (p *Page) analyzePage() {
749749

750750
func (p *Page) Extension() string {
751751
// Remove in Hugo 0.22.
752-
helpers.Deprecated("Page", "Extension", "See OutputFormats with its MediaType", false)
752+
helpers.Deprecated("Page", "Extension", "See OutputFormats with its MediaType", true)
753753
return p.extension
754754
}
755755

@@ -1510,7 +1510,7 @@ func (p *Page) copy() *Page {
15101510

15111511
func (p *Page) Now() time.Time {
15121512
// Delete in Hugo 0.22
1513-
helpers.Deprecated("Page", "Now", "Use now (the template func)", false)
1513+
helpers.Deprecated("Page", "Now", "Use now (the template func)", true)
15141514
return time.Now()
15151515
}
15161516

‎hugolib/page_paths.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,6 +251,6 @@ func (p *Page) createRelativePermalinkForOutputFormat(f output.Format) string {
251251

252252
func (p *Page) TargetPath() (outfile string) {
253253
// Delete in Hugo 0.22
254-
helpers.Deprecated("Page", "TargetPath", "This method does not make sanse any more.", false)
254+
helpers.Deprecated("Page", "TargetPath", "This method does not make sanse any more.", true)
255255
return ""
256256
}

0 commit comments

Comments
 (0)