mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-22 21:42:50 +02:00
resource: Add front matter metadata to Resource
This commit expands the Resource interface with 3 new methods: * Name * Title * Params All of these can be set in the Page front matter. `Name` will get its default value from the base filename, and is the value used in the ByPrefix and GetByPrefix lookup methods. Fixes #4244
This commit is contained in:
@@ -217,7 +217,7 @@ func dumpPages(pages ...*Page) {
|
||||
for i, p := range pages {
|
||||
fmt.Printf("%d: Kind: %s Title: %-10s RelPermalink: %-10s Path: %-10s sections: %s Len Sections(): %d\n",
|
||||
i+1,
|
||||
p.Kind, p.Title, p.RelPermalink(), p.Path(), p.sections, len(p.Sections()))
|
||||
p.Kind, p.title, p.RelPermalink(), p.Path(), p.sections, len(p.Sections()))
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user