fix: use jsonify
to generate valid json (#521)
This commit is contained in:
parent
d2bbcb791f
commit
dd9d5a7207
1 changed files with 5 additions and 5 deletions
|
@ -6,13 +6,13 @@ swcache: true
|
|||
[
|
||||
{% for post in site.posts %}
|
||||
{
|
||||
"title": "{{ post.title | escape }}",
|
||||
"url": "{{ post.url | relative_url }}",
|
||||
"categories": "{{ post.categories | join: ', '}}",
|
||||
"tags": "{{ post.tags | join: ', ' }}",
|
||||
"title": {{ post.title | jsonify }},
|
||||
"url": {{ post.url | relative_url | jsonify }},
|
||||
"categories": {{ post.categories | join: ', ' | jsonify }},
|
||||
"tags": {{ post.tags | join: ', ' | jsonify }},
|
||||
"date": "{{ post.date }}",
|
||||
{% include no-linenos.html content=post.content %}
|
||||
"snippet": "{{ content | strip_html | strip_newlines | remove_chars | escape | replace: '\', '\\\\' }}"
|
||||
"snippet": {{ content | strip_html | strip_newlines | jsonify }}
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue