mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-29 22:29:56 +02:00
resources/page: Re-introduce .Page.Page
It was removed in 597e418cb0
-- it's not documented, but it's used in too many real sites on the web.
See #5784
This commit is contained in:
@@ -107,7 +107,12 @@ func generateMarshalJSON(c *codegen.Inspector) error {
|
||||
return errors.New("no methods found")
|
||||
}
|
||||
|
||||
marshalJSON, pkgImports := methods.ToMarshalJSON("Page", "github.com/gohugoio/hugo/resources/page")
|
||||
marshalJSON, pkgImports := methods.ToMarshalJSON(
|
||||
"Page",
|
||||
"github.com/gohugoio/hugo/resources/page",
|
||||
// Exclusion regexps. Matches method names.
|
||||
`\bPage\b`,
|
||||
)
|
||||
|
||||
fmt.Fprintf(f, `%s
|
||||
|
||||
|
Reference in New Issue
Block a user