router_static.go: use different template delims
Vue.js uses the same template system {{variable}}, and that clashes with Go's default delimiters for templates.
This commit is contained in:
parent
72ab137f06
commit
e0f9679694
@ -45,7 +45,7 @@ func initStaticRouter(router *mux.Router) error {
|
||||
return err
|
||||
}
|
||||
|
||||
t, err := template.New(page).Parse(string(contents))
|
||||
t, err := template.New(page).Delims("<<<", ">>>").Parse(string(contents))
|
||||
if err != nil {
|
||||
logger.Errorf("cannot parse %s.html template: %v", page, err)
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user