mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-21 21:35:28 +02:00
Creating site menu configuration and have the docs site use it
This commit is contained in:
@@ -490,18 +490,7 @@ func (page *Page) Menus() PageMenus {
|
||||
jww.ERROR.Printf("unable to process menus for %q\n", page.Title)
|
||||
}
|
||||
|
||||
for k, v := range ime {
|
||||
loki := strings.ToLower(k)
|
||||
switch loki {
|
||||
case "weight":
|
||||
menuEntry.Weight = cast.ToInt(v)
|
||||
case "name":
|
||||
menuEntry.Name = cast.ToString(v)
|
||||
case "parent":
|
||||
menuEntry.Parent = cast.ToString(v)
|
||||
}
|
||||
}
|
||||
|
||||
menuEntry.MarshallMap(ime)
|
||||
ret[name] = &menuEntry
|
||||
}
|
||||
return ret
|
||||
|
Reference in New Issue
Block a user