2018-01-05 02:22:33 +01:00
|
|
|
---
|
2020-07-24 14:22:16 +02:00
|
|
|
layout: none
|
2018-01-05 02:22:33 +01:00
|
|
|
---
|
|
|
|
|
|
|
|
var store = [
|
2018-01-05 02:52:01 +01:00
|
|
|
{%- for c in site.collections -%}
|
|
|
|
{%- if forloop.last -%}
|
|
|
|
{%- assign l = true -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{%- assign docs = c.docs | where_exp:'doc','doc.search != false' -%}
|
|
|
|
{%- for doc in docs -%}
|
|
|
|
{%- if doc.header.teaser -%}
|
|
|
|
{%- capture teaser -%}{{ doc.header.teaser }}{%- endcapture -%}
|
|
|
|
{%- else -%}
|
|
|
|
{%- assign teaser = site.teaser -%}
|
|
|
|
{%- endif -%}
|
2018-01-05 02:22:33 +01:00
|
|
|
{
|
|
|
|
"title": {{ doc.title | jsonify }},
|
|
|
|
"excerpt":
|
2018-01-05 02:52:01 +01:00
|
|
|
{%- if site.search_full_content == true -%}
|
2018-10-09 19:54:36 +02:00
|
|
|
{{ doc.content | newline_to_br |
|
|
|
|
replace:"<br />", " " |
|
2018-03-20 16:48:30 +01:00
|
|
|
replace:"</p>", " " |
|
|
|
|
replace:"</h1>", " " |
|
|
|
|
replace:"</h2>", " " |
|
|
|
|
replace:"</h3>", " " |
|
|
|
|
replace:"</h4>", " " |
|
|
|
|
replace:"</h5>", " " |
|
|
|
|
replace:"</h6>", " "|
|
|
|
|
strip_html | strip_newlines | jsonify }},
|
2018-01-05 02:52:01 +01:00
|
|
|
{%- else -%}
|
2018-10-09 19:54:36 +02:00
|
|
|
{{ doc.content | newline_to_br |
|
|
|
|
replace:"<br />", " " |
|
2018-03-20 16:48:30 +01:00
|
|
|
replace:"</p>", " " |
|
|
|
|
replace:"</h1>", " " |
|
|
|
|
replace:"</h2>", " " |
|
|
|
|
replace:"</h3>", " " |
|
|
|
|
replace:"</h4>", " " |
|
|
|
|
replace:"</h5>", " " |
|
|
|
|
replace:"</h6>", " "|
|
|
|
|
strip_html | strip_newlines | truncatewords: 50 | jsonify }},
|
2018-01-05 02:52:01 +01:00
|
|
|
{%- endif -%}
|
2018-01-05 02:22:33 +01:00
|
|
|
"categories": {{ doc.categories | jsonify }},
|
|
|
|
"tags": {{ doc.tags | jsonify }},
|
2021-02-06 02:20:12 +01:00
|
|
|
"url": {{ doc.url | relative_url | jsonify }},
|
|
|
|
"teaser": {{ teaser | relative_url | jsonify }}
|
2018-01-05 02:52:01 +01:00
|
|
|
}{%- unless forloop.last and l -%},{%- endunless -%}
|
|
|
|
{%- endfor -%}
|
2022-05-27 17:39:47 +02:00
|
|
|
{%- endfor -%}{%- if site.lunr.search_within_pages -%},
|
2022-05-27 17:48:46 +02:00
|
|
|
{%- assign pages = site.pages | where_exp:'doc','doc.search != false' -%}
|
|
|
|
{%- for doc in pages -%}
|
2022-05-27 17:39:47 +02:00
|
|
|
{%- if forloop.last -%}
|
|
|
|
{%- assign l = true -%}
|
|
|
|
{%- endif -%}
|
|
|
|
{
|
|
|
|
"title": {{ doc.title | jsonify }},
|
|
|
|
"excerpt":
|
|
|
|
{%- if site.search_full_content == true -%}
|
|
|
|
{{ doc.content | newline_to_br |
|
|
|
|
replace:"<br />", " " |
|
|
|
|
replace:"</p>", " " |
|
|
|
|
replace:"</h1>", " " |
|
|
|
|
replace:"</h2>", " " |
|
|
|
|
replace:"</h3>", " " |
|
|
|
|
replace:"</h4>", " " |
|
|
|
|
replace:"</h5>", " " |
|
|
|
|
replace:"</h6>", " "|
|
|
|
|
strip_html | strip_newlines | jsonify }},
|
|
|
|
{%- else -%}
|
|
|
|
{{ doc.content | newline_to_br |
|
|
|
|
replace:"<br />", " " |
|
|
|
|
replace:"</p>", " " |
|
|
|
|
replace:"</h1>", " " |
|
|
|
|
replace:"</h2>", " " |
|
|
|
|
replace:"</h3>", " " |
|
|
|
|
replace:"</h4>", " " |
|
|
|
|
replace:"</h5>", " " |
|
|
|
|
replace:"</h6>", " "|
|
|
|
|
strip_html | strip_newlines | truncatewords: 50 | jsonify }},
|
|
|
|
{%- endif -%}
|
|
|
|
"url": {{ doc.url | absolute_url | jsonify }}
|
|
|
|
}{%- unless forloop.last and l -%},{%- endunless -%}
|
|
|
|
{%- endfor -%}
|
|
|
|
{%- endif -%}]
|