mirror of
https://github.com/danog/gojekyll.git
synced 2024-11-27 10:54:46 +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 {
|
e.engine.DefineFilter("relative_url", func(s string) string {
|
||||||
return e.BaseURL + s
|
return e.BaseURL + s
|
||||||
})
|
})
|
||||||
e.engine.DefineFilter("jsonify", func(value interface{}) []byte {
|
e.engine.DefineFilter("jsonify", json.Marshal)
|
||||||
s, err := json.Marshal(value)
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
return s
|
|
||||||
})
|
|
||||||
e.engine.DefineFilter("markdownify", blackfriday.MarkdownCommon)
|
e.engine.DefineFilter("markdownify", blackfriday.MarkdownCommon)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user