mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-19 06:06:54 +00:00
fix: escape special JSON characters in search results (#2481)
Also restore full-text search
This commit is contained in:
@@ -5,16 +5,13 @@ swcache: true
|
||||
|
||||
[
|
||||
{% for post in site.posts %}
|
||||
{%- capture description -%}
|
||||
{% include post-description.html %}
|
||||
{%- endcapture -%}
|
||||
{
|
||||
"title": {{ post.title | jsonify }},
|
||||
"url": {{ post.url | relative_url | jsonify }},
|
||||
"categories": {{ post.categories | join: ', ' | jsonify }},
|
||||
"tags": {{ post.tags | join: ', ' | jsonify }},
|
||||
"date": "{{ post.date }}",
|
||||
"content": "{{ description }}"
|
||||
"date": {{ post.date | jsonify }},
|
||||
"content": {% include post-description.html json=true %}
|
||||
}{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user