-
Notifications
You must be signed in to change notification settings - Fork 11
/
search.json
55 lines (54 loc) · 1.68 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
---
layout: none
---
[
{% for post in site.posts %}
{
"title" : "{{ post.title | escape }}",
"category" : "{{ post.category }}",
"tags" : "{{ post.tags | join: ', ' }}",
"url" : "{{ site.baseurl }}{{ post.url }}",
"content" : "{{ post.excerpt }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
{% assign urlBlackList = "/index.html,/404" | split: ',' %}
{% for page in site.pages %}
{% if page.layout == "author" or page.title == blank or urlBlackList contains page.url %}
{% continue %}
{% endif %}
{% assign urlItems = page.url | split: '/'%}
{% if urlItems contains 'index.html' and urlItems contains 'page' %}
{% continue %}
{% endif %}
{% if urlItems contains 'drafts' %}
{% continue %}
{% endif %}
,{
"title" : "{{ page.title | escape }}",
"url" : "{{ site.baseurl }}{{ page.url | replace: 'index.html', '' }}"
}
{% endfor %}
,
{% for author in site.data.authors %}
{
"title" : "Articles by {{ author[1].name | escape }}",
"url" : "/author/{{ author[0] | downcase | slugify }}/"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
,
{% for series in site.series %}
{
"title" : "Posts in series {{ series.title | escape }}",
"url" : "{{ series.url }}",
"content" : "{{ series.excerpt }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
,
{% for tool in site.tools %}
{
"title" : "Tool: {{ tool.title | escape }}",
"url" : "{{ tool.url }}",
"content" : "{{ tool.excerpt }}"
} {% unless forloop.last %},{% endunless %}
{% endfor %}
]