forked from kaaproject/kaa
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search_dictionary.json
24 lines (24 loc) · 990 Bytes
/
search_dictionary.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
---
sitemap: false
---
{% capture database %}
{% include variables.md %}
{
{% for post in site.pages %}
{% if post.url contains version and post.url != page.url %}
{% assign processed_content = '' %}
{% assign content = post.content | strip_html | jsonify | replace: '\r', '\n' | split: '\n'%}
{% for content_chunk in content %}
{% capture processed_content %}{{ processed_content }}{{ content_chunk | strip }}{% unless forloop.last %}\n{% endunless %}{% endcapture %}
{% endfor %}
,
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ processed_content }},
"url": "{{ site.baseurl}}{{ post.url | xml_escape }}"
}
{% endif %}
{% endfor %}
}
{% endcapture %}
{{ database | replace_first: ',', '' | strip_newlines | replace: '\n\n\n\n', '\n' | replace: '\n\n\n', '\n' | replace: '\n\n', '\n' | split: ' ' | join: ' ' }}