Skip to content

Commit f1df2b1

Browse files
author
JunQiang
committed
search template
1 parent 7d4d35c commit f1df2b1

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

assets/js/data/search.json

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ swcache: true
88
{%- capture description -%}
99
{% include post-description.html %}
1010
{%- endcapture -%}
11-
{
12-
"title": {{ post.title | jsonify }},
13-
"url": {{ post.url | relative_url | jsonify }},
14-
"categories": {{ post.categories | join: ', ' | jsonify }},
15-
"tags": {{ post.tags | join: ', ' | jsonify }},
16-
"date": "{{ post.date }}",
17-
"content": "{{ description }}"
18-
}{% unless forloop.last %},{% endunless %}
11+
{
12+
"title": {{ post.title | jsonify }},
13+
"url": {{ post.url | relative_url | jsonify }},
14+
"categories": {{ post.categories | jsonify }},
15+
"tags": {{ post.tags | jsonify }},
16+
"date": {{ post.date | date_to_xmlschema | jsonify }},
17+
"content": {{ description | strip_html | replace: "\\", "\\\\" | jsonify }}
18+
}{% unless forloop.last %},{% endunless %}
1919
{% endfor %}
20-
]
20+
]

0 commit comments

Comments
 (0)