-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
34 lines (30 loc) · 865 Bytes
/
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
28
29
30
31
32
33
34
---
title: search
layout: none
search: exclude
---
{% assign pages = site.html_pages | where_exp: "page", "page.search != 'exclude'" %}
[
{% for page in pages %}
{
"title": {{ page.title | jsonify }},
"tags": {{ page.tags | jsonify }},
"keywords": {{ page.keywords | jsonify }},
"url": {{ page.url | remove: "/" | jsonify }},
"location": {{ page.location | jsonify }},
"default_location": {{ page.default_location | jsonify }}
}
{% unless forloop.last and site.posts.size < 1 %},{% endunless %}
{% endfor %}
{% for post in site.posts %}
{
"title": {{ post.title | jsonify }},
"tags": {{ post.tags | jsonify }},
"keywords": {{ post.keywords | jsonify }},
"url": {{ post.url | remove: "/" | jsonify }},
"location": {{ post.location | jsonify }},
"default_location": {{ page.default_location | jsonify }}
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
]