1
0
mirror of https://github.com/gohugoio/hugo.git synced 2024-05-11 05:54:58 +00:00

Add jsonify template func

This commit is contained in:
Bjørn Erik Pedersen
2016-03-06 14:58:15 +01:00
parent c8c6f5d05b
commit 435e996c4f
3 changed files with 21 additions and 0 deletions

View File

@@ -112,6 +112,14 @@ e.g.
{{ .Render "summary" }}
{{ end }}
### jsonify
Encodes a given object to JSON.
e.g.
{{ dict "title" .Title "content" .Plain | jsonify }}
### last
Slices an array to only the last _N_ elements.