-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
27 lines (25 loc) · 1.07 KB
/
search.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
25
26
27
---
sitemap: false
---
[
{% for post in site.posts %}
{% if post.title != null and post.title != empty and post.search_omit != true %}
{% if forloop.index > 1 %},{% endif %}{
"title" : {{ post.title | jsonify }},
"link" : "{% if post.link %}{{ post.link }}{% else %}{{ site.url }}{{ post.url }}{% endif %}",
"tags" : "{{ post.tags }}",
"content" : "{{ post.excerpt | markdownify | strip_html | strip_newlines | escape_once | remove: '\[' | remove: '\]' | remove: '\(' | remove: '\)' | remove: '\"' | remove: '$' | remove: '\' }}"
}
{% endif %}
{% endfor %}
{% for page in site.pages %}
{% if page.layout != 'none' and page.layout != 'none' and page.title != null and page.title != empty and page.search_omit != true %}
{% if forloop.index > 1 %},{% endif %}{
"title" : {{ page.title | jsonify }},
"link" : "{{ site.url }}{{ page.url | replace: 'index.html', '' }}",
"content" : "{{ page.excerpt | markdownify | strip_html | strip_newlines | escape_once }}",
"tags" : ""
}
{%endif%}
{% endfor %}
]