1
0
mirror of https://github.com/thangisme/notes.git synced 2024-06-17 13:35:24 +00:00
notes/assets/js/search-data.json
EricFromCanada 60c82cb518 Allow for ampersand in title or URL
Because `page.title` (and `page.url`) is already escaped and page titles served by lunrjs do not need escaping, ampersands need to be unescaped to display properly in search results.
2019-01-16 00:31:30 -05:00

13 lines
530 B
JSON

---
---
{
{% for page in site.html_pages %}{% if page.search_exclude != true %}"{{ forloop.index0 }}": {
"id": "{{ forloop.index0 }}",
"title": "{{ page.title | replace: '&', '&' }}",
"content": "{{ page.content | markdownify | strip_html | escape_once | remove: 'Table of contents' | remove: '```' | remove: '---' | replace: '\', ' ' | normalize_whitespace }}",
"url": "{{ page.url | absolute_url }}",
"relUrl": "{{ page.url }}"
}{% unless forloop.last %},{% endunless %}
{% endif %}{% endfor %}
}