1
0
mirror of https://github.com/danog/gojekyll.git synced 2024-11-27 06:34:43 +01:00

Simplify jsonfiy tag

This commit is contained in:
Oliver Steele 2017-06-28 22:33:54 -04:00
parent 61760569fa
commit fda9916308

View File

@ -52,13 +52,7 @@ func (e *LocalWrapperEngine) addJekyllFilters() {
e.engine.DefineFilter("relative_url", func(s string) string {
return e.BaseURL + s
})
e.engine.DefineFilter("jsonify", func(value interface{}) []byte {
s, err := json.Marshal(value)
if err != nil {
panic(err)
}
return s
})
e.engine.DefineFilter("jsonify", json.Marshal)
e.engine.DefineFilter("markdownify", blackfriday.MarkdownCommon)
}