From 6774e0e1fb37cf467b14be481347412713763f05 Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 5 Nov 2022 04:14:50 +0800 Subject: [PATCH] fix: restore full-text search (#741) Resolves #741 --- assets/js/data/search.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/assets/js/data/search.json b/assets/js/data/search.json index 1a766d9..2601ed0 100644 --- a/assets/js/data/search.json +++ b/assets/js/data/search.json @@ -12,7 +12,9 @@ swcache: true "tags": {{ post.tags | join: ', ' | jsonify }}, "date": "{{ post.date }}", {% include no-linenos.html content=post.content %} - "snippet": {{ content | strip_html | strip_newlines | truncate: 200 | jsonify }} + {% assign _content = content | strip_html | strip_newlines %} + "snippet": {{ _content | truncate: 200 | jsonify }}, + "content": {{ _content | jsonify }} }{% unless forloop.last %},{% endunless %} {% endfor %} ]