forked from PixelExperience/wiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.json
38 lines (36 loc) · 1.34 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
---
title: search
layout: none
search: exclude
---
[
{%- for page in site.pages %}
{%- unless page.search == "exclude" or page.url contains "_info.html" or page.url contains "_install.html" or page.url contains "_build.html" or page.url contains "devices.html" or page.url contains "_update.html" or page.url contains "_upgrade.html" or page.url contains ".css" %}
{%- unless page.url contains "/devices" and page.url contains "/build" or page.url contains "/devices" and page.url contains "/install" or page.url contains "/devices" and page.url contains "/fw_update" or page.url contains "/devices" and page.url contains "/update" or page.url contains "/devices" and page.url contains "/upgrade"%}
{%- if page.url contains "/devices" %}
{%- assign device = site.data.devices[page.device] %}
{%- if device.codename %}
{%- capture title %}{{ device.codename | escape }} - {{ device.vendor | escape }} {{ device.name }}{%- endcapture %}
{%- else -%}
{%- assign title = page.title | escape %}
{%- endif %}
{% else -%}
{%- assign title = page.title | escape %}
{% endif -%}
{%- if title %}
{%- if marker %}
,
{%- endif %}
{% assign marker = true %}
{
"title": "{{ title }}",
"tags": "{{ page.tags }}",
"keywords": "{{page.keywords}}",
"url": "{{ page.url | relative_url }}",
"summary": "{{page.summary | strip }}"
}
{%- endif %}
{%- endunless %}
{%- endunless %}
{%- endfor %}
]