Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Pre and Post in Menu are type HTML

  • Loading branch information...
commit 57ad3abe7bcbe958450a66f6f487c05f8222cf33 1 parent a87f171
Steve Francia authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 hugolib/menu.go
9 hugolib/menu.go
View
@@ -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":
Please sign in to comment.
Something went wrong with that request. Please try again.