Creating site menu configuration and have the docs site use it

This commit is contained in:
spf13
2014-04-24 16:11:08 -06:00
parent ac82fe32af
commit bdf7cd9f9d
5 changed files with 91 additions and 18 deletions

View File

@@ -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