mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Add Sitemaps config values handling
This commit is contained in:
committed by
spf13
parent
f8e675d064
commit
2a902bbca6
@@ -141,7 +141,7 @@ func renderBytes(content []byte, pagefmt string) []byte {
|
||||
func newPage(filename string) *Page {
|
||||
page := Page{contentType: "",
|
||||
File: File{FileName: filename, Extension: "html"},
|
||||
Node: Node{Keywords: []string{}},
|
||||
Node: Node{Keywords: []string{}, Sitemap: Sitemap{Priority: -1}},
|
||||
Params: make(map[string]interface{})}
|
||||
|
||||
jww.DEBUG.Println("Reading from", page.File.FileName)
|
||||
@@ -342,6 +342,8 @@ func (page *Page) update(f interface{}) error {
|
||||
}
|
||||
case "status":
|
||||
page.Status = cast.ToString(v)
|
||||
case "sitemap":
|
||||
page.Sitemap = parseSitemap(cast.ToStringMap(v))
|
||||
default:
|
||||
// If not one of the explicit values, store in Params
|
||||
switch vv := v.(type) {
|
||||
|
Reference in New Issue
Block a user