mirror of
https://github.com/thangisme/notes.git
synced 2024-11-20 04:15:55 -05:00
Fix search issues
This commit is contained in:
parent
09944de128
commit
0c9678c2e6
@ -1,12 +0,0 @@
|
||||
---
|
||||
---
|
||||
{
|
||||
{% assign comma = false %}
|
||||
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
|
||||
"title": "{{ page.title | replace: '&', '&' }}",
|
||||
"content": "{{ page.content | markdownify | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}",
|
||||
"url": "{{ page.url | absolute_url }}",
|
||||
"relUrl": "{{ page.url }}"
|
||||
}{% assign comma = true %}
|
||||
{% endif %}{% endfor %}
|
||||
}
|
13
assets/js/zzzz-search-data.json
Normal file
13
assets/js/zzzz-search-data.json
Normal file
@ -0,0 +1,13 @@
|
||||
---
|
||||
permalink: /assets/js/search-data.json
|
||||
---
|
||||
{
|
||||
{% assign comma = false %}
|
||||
{% for page in site.html_pages %}{% if page.search_exclude != true %}{% if comma == true%},{% endif %}"{{ forloop.index0 }}": {
|
||||
"title": "{{ page.title | escape_once }}",
|
||||
"content": "{{ page.content | replace: '</h', ' . </h' | replace: '<hr', ' . <hr' | replace: '</p', ' . </p' | replace: '</ul', ' . </ul' | replace: '</tr', ' . </tr' | replace: '</li', ' | </li' | replace: '</td', ' | </td' | strip_html | escape_once | remove: 'Table of contents' | replace: '\', ' ' | replace: ' . . . ', ' . ' | replace: ' . . ', ' . ' | normalize_whitespace }}",
|
||||
"url": "{{ page.url | absolute_url }}",
|
||||
"relUrl": "{{ page.url }}"
|
||||
}{% assign comma = true %}
|
||||
{% endif %}{% endfor %}
|
||||
}
|
Loading…
Reference in New Issue
Block a user