-
Notifications
You must be signed in to change notification settings - Fork 6
/
elasticsearch.json
37 lines (37 loc) · 1.58 KB
/
elasticsearch.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
---
---
[
{% assign cmds = "" | split: "" %}
{% assign nums = "" | split: "" %}
{% for p in site.pages %}{% if p.notstarted %}{% else %}
{% if p.layout == "command" %}
{% assign cmds = cmds | push: p %}
{% elsif p.layout == "numeric" %}
{% assign nums = nums | push: p %}
{% endif %}
{% endif %}{% endfor %}
{% for cmd in cmds %}
{
"relative_url": {{ cmd.url | jsonify }},
"title": {{ cmd.title | jsonify }},{% assign cmd_id = cmd.command | slugify %}{% assign info = site.data.commands.info[cmd_id] %}{% if info %}
"desc": {{ info.desc | jsonify }},{% endif %}
"tags": [
"command"{% if 0 < cmd.command-groups.size %},{% endif %}
{% for group in cmd.command-groups %}{{ group | jsonify }}{% if forloop.last == false %},{% endif %}{% endfor %}
],
"content": {{ cmd.rawmd | jsonify }}
}{% if forloop.last == false %},{% endif %}
{% endfor %},
{% for num in nums %}
{
"relative_url": {{ num.url | jsonify }},
"title": {{ num.title | jsonify }},{% assign num_id = num.numeric | slugify %}{% assign info = site.data.numerics.info[num_id] %}{% if info %}
"desc": {{ info.desc | jsonify }},{% endif %}
"tags": [
"numeric"{% if 0 < num.command-groups.size %},{% endif %}
{% for group in num.command-groups %}{{ group | jsonify }}{% if forloop.last == false %},{% endif %}{% endfor %}
],
"content": {{ num.rawmd | jsonify }}
}{% if forloop.last == false %},{% endif %}
{% endfor %}
]