mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-28 22:19:59 +02:00
hugolib: Fix simple menu config
This stopped working in Hugo 0.55: ```bash --- menu: "main" --- ``` This was also the case for using a slice of menu entries. This still worked: --- menu: main: weight: 30 ---
This commit is contained in:
@@ -60,7 +60,7 @@ func PageMenusFromPage(p Page) (PageMenus, error) {
|
||||
if err == nil {
|
||||
me.Menu = mname
|
||||
pm[mname] = &me
|
||||
return nil, nil
|
||||
return pm, nil
|
||||
}
|
||||
|
||||
// Could be a slice of strings
|
||||
@@ -71,7 +71,7 @@ func PageMenusFromPage(p Page) (PageMenus, error) {
|
||||
me.Menu = mname
|
||||
pm[mname] = &me
|
||||
}
|
||||
return nil, nil
|
||||
return pm, nil
|
||||
}
|
||||
|
||||
// Could be a structured menu entry
|
||||
|
Reference in New Issue
Block a user