diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -105,7 +105,12 @@ func readConfig() ConfigFile { } func getTemplate(name string) *template.Template { - return template.Must(template.ParseFiles(templatePath+"/layout.html", templatePath+"/"+name)) + return template.Must(template.New("layout.html").Funcs(template.FuncMap { + "contains": strings.Contains, + }).ParseFiles( + templatePath+"/layout.html", + templatePath+"/"+name, + )) } func main() { |