summaryrefslogtreecommitdiffstats
path: root/hugolib/menu.go
diff options
context:
space:
mode:
authorspf13 <steve.francia@gmail.com>2014-05-27 18:34:29 -0400
committerspf13 <steve.francia@gmail.com>2014-05-27 18:34:29 -0400
commit57ad3abe7bcbe958450a66f6f487c05f8222cf33 (patch)
treed6bddf6d667b20af5bccf873ef6f9f5357b2a30a /hugolib/menu.go
parenta87f171bd4446773e05198427e920571af63e650 (diff)
Pre and Post in Menu are type HTML
Diffstat (limited to 'hugolib/menu.go')
-rw-r--r--hugolib/menu.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/hugolib/menu.go b/hugolib/menu.go
index 060f3855c..471f29610 100644
--- a/hugolib/menu.go
+++ b/hugolib/menu.go
@@ -14,6 +14,7 @@
package hugolib
import (
+ "html/template"
"sort"
"strings"
@@ -25,8 +26,8 @@ type MenuEntry struct {
Name string
Menu string
Identifier string
- PreName string
- PostName string
+ Pre template.HTML
+ Post template.HTML
Weight int
Parent string
Children Menu
@@ -76,6 +77,10 @@ func (me *MenuEntry) MarshallMap(ime map[string]interface{}) {
me.Weight = cast.ToInt(v)
case "name":
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":
me.Identifier = cast.ToString(v)
case "parent":