mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
Pre and Post in Menu are type HTML
This commit is contained in:
parent
a87f171bd4
commit
57ad3abe7b
1 changed files with 7 additions and 2 deletions
|
@ -14,6 +14,7 @@
|
||||||
package hugolib
|
package hugolib
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"html/template"
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -25,8 +26,8 @@ type MenuEntry struct {
|
||||||
Name string
|
Name string
|
||||||
Menu string
|
Menu string
|
||||||
Identifier string
|
Identifier string
|
||||||
PreName string
|
Pre template.HTML
|
||||||
PostName string
|
Post template.HTML
|
||||||
Weight int
|
Weight int
|
||||||
Parent string
|
Parent string
|
||||||
Children Menu
|
Children Menu
|
||||||
|
@ -76,6 +77,10 @@ func (me *MenuEntry) MarshallMap(ime map[string]interface{}) {
|
||||||
me.Weight = cast.ToInt(v)
|
me.Weight = cast.ToInt(v)
|
||||||
case "name":
|
case "name":
|
||||||
me.Name = cast.ToString(v)
|
me.Name = cast.ToString(v)
|
||||||
|
case "pre":
|
||||||
|
me.Pre = template.HTML(cast.ToString(v))
|
||||||
|
case "post":
|
||||||
|
me.Post = template.HTML(cast.ToString(v))
|
||||||
case "identifier":
|
case "identifier":
|
||||||
me.Identifier = cast.ToString(v)
|
me.Identifier = cast.ToString(v)
|
||||||
case "parent":
|
case "parent":
|
||||||
|
|
Loading…
Reference in a new issue