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:
parent
61760569fa
commit
fda9916308
@ -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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user