-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.json
56 lines (56 loc) · 2.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
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
56
---
# layout: minify
# modules, commands, tutorials, howto, general
---
{
{% assign types = "module, tutorial, howto, general" | split: ", " -%}
"standard":
{
{% for type in types -%}
{%- assign index = site.pages | where: "type", type -%}
{% for page in index -%}
"{{ page.url }}":
{
"title": "{{ page.header | xml_escape }}",
"lead": "{{ page.lead | default: '' | xml_escape }}",
"content": {{ page.content | markdownify | strip_html | newline_to_br | replace: '<br />', ' ' | jsonify }},
"keywords": "{{ page.keywords | default: "" }}",
"url": "{{ page.url | xml_escape }}",
"type": "{{type}}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}{% unless forloop.last %},{% endunless %}
{% endfor %}
},
"command":
{
{% for command in site.data.commands -%}
"{{ command.commandName }}": {
"url": "/docs/commands2.html#{{ command.commandName | replace: ' ', '-' }}",
"type": "command",
"command": "{{ command.commandName }}",
"aliases": "{{command.aliases}}",
"rootAliases": "{{command.rootAliases}}",
"usage": {{ command.simpleUsage | newline_to_br | escape | strip | jsonify }},
{%- if command.permissionbase %}
"basePermission": "{{ command.permissionbase }}",
{%- else -%}
"basePermission": "none",
{% endif %}
"oneliner": {{ command.oneLineDescription | escape | strip_html | strip_newlines | jsonify }},
"extendedDescription": {{ command.extendedDescription | escape | strip_html | strip_newlines | jsonify }}
}{% unless forloop.last %},{% endunless %}
{%- endfor -%}
},
"token":
{
{% for token in site.data.tokens -%}
"{{ token.name }}": {
"title": "{{ token.name | xml_escape }}",
"id": "{{ token.id | xml_escape }}",
"content": {{ token.description | escape | strip_html | strip_newlines | jsonify}},
"url": "/docs/links-and-tokens.html",
"type": "{{type}}"
}{% unless forloop.last %},{% endunless %}
{% endfor -%}
}
}