Improve search content generator

This commit is contained in:
EricFromCanada
2019-01-15 21:19:37 -05:00
parent 793ea356c3
commit 9a4ea76957
3 changed files with 3 additions and 3 deletions

View File

@@ -40,7 +40,7 @@ This command creates the `search-data.json` file that Jekyll uses to create your
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | xml_escape }}",
"content": "{{ page.content | markdownify | strip_html | xml_escape | remove: 'Table of contents' | remove: page.title | strip_newlines | replace: '\', ' '}}",
"content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
"url": "{{ page.url | absolute_url | xml_escape }}",
"relUrl": "{{ page.url | xml_escape }}"
}{% unless forloop.last %},{% endunless %}