-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathsearch_data.json
173 lines (155 loc) · 7.35 KB
/
search_data.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
layout: null
---
{% comment %}
capture a newline such that we can replace it by space
{% endcomment %}
{% capture newline %}
{% endcapture %}
{
{% assign blog_cnt = 0 %}
{% for post in site.demos %}
{% assign blog_cnt = blog_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip}},
"url": "{{ post.url | xml_escape }}",
"link": "{{ post.link | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless blog_cnt == 0 %},{% endunless %}
{% assign techdoc_cnt = 0 %}
{% for post in site.news %}
{% assign techdoc_cnt = techdoc_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip}},
"url": "{{ post.url | xml_escape }}",
"eurl": "{{ post.eurl | xml_escape }}",
"source-url": "{{ post.source-url | xml_escape }}",
"date": "{{post.date | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless techdoc_cnt == 0 %},{% endunless %}
{% assign confdoc_cnt = 0 %}
{% for post in site.conferences %}
{% assign confdoc_cnt = confdoc_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip}},
"url": "{{ post.url | xml_escape }}",
"link": "{{ post.link | xml_escape }}",
"date": "{{post.date | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless confdoc_cnt == 0 %},{% endunless %}
{% assign opendoc_cnt = 0 %}
{% for post in site.open-software %}
{% assign opendoc_cnt = opendoc_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip}},
"url": "{{ post.url | xml_escape }}",
"link": "{{ post.link | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless opendoc_cnt == 0 %},{% endunless %}
{% assign scientdoc_cnt = 0 %}
{% for post in site.scientific-papers %}
{% assign scientdoc_cnt = scientdoc_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip}},
"url": "{{ post.url | xml_escape }}",
"doi": "{{ post.doi | xml_escape }}",
"eurl": "{{ post.eurl | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}"
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless scientdoc_cnt == 0 %},{% endunless %}
{% assign tutorial_cnt = 0 %}
{% for post in site.tutorials %}
{% assign tutorial_cnt = tutorial_cnt | plus: 1 %}
{% if post.position == "hidden" or post.published == "false" %}
"#": {}
{% unless forloop.last %},{% endunless %}
{% else %}
{% comment %}
PDFs that must be included in the search index, have their text extracted using pdf2txt
the resulting .txt file is indicated in the yaml section of the resp .md file with pdf2txt: <filename>
multiple of such files can be listed
in variable "junk", we capture the content of all these pdf2txt .txt files using include_relative <filename>
further down we include "junk" after cleaning up
{% endcomment %}
{% capture junk %}
{% assign all_pdfs = post.pdf2txt | split:',' %}{% for pdf in all_pdfs %}{{ pdf }} {% include_relative {{pdf}} %}{% endfor %}
{% endcapture %}
"{{ post.url | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"content": {{ post.content | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | jsonify | strip }},
"url": "{{ post.url | xml_escape }}",
"link": "{{ post.link | xml_escape }}",
"author": "{{ post.author | xml_escape }}",
"tags": "{% for tag in post.tags %}{{ tag }}{% unless forloop.last %}, {% endunless %}{% endfor %}",
"pdf2txt": {{ junk | replace: newline, ' ' | strip_newlines | strip_html | replace: '"', '~' | replace: '#', ' ' | remove: '%0C' | jsonify | strip | remove: '\f'}}
}
{% endif %}
{% unless forloop.last %}{% unless post.position == "hidden" or post.published == "false" %},{% endunless %}{% endunless %}
{% endfor %}
{% unless tutorial_cnt == 0 %},{% endunless %}
{% assign catlist = "list_architecture, list_srv6, list_srmpls, list_usecases, list_deploy, list_frr, list_network_resource_partitioning, list_pm, list_oam, list_path_tracing, list_service_programming, list_bgp, list_bgp_ls, list_isis, list_ospf, list_pcep, list_mcast, list_yang" | split:", " %}
{% assign ietf_cnt = 0 %}
{% for category in catlist %}
{% for post in site.data.ietf[category] %}
{% assign ietf_cnt = ietf_cnt | plus: 1 %}
{% comment %}
1. abusing "link" field to contain IETF status
2. we can probably add the RFC/draft abstract as "content" here
{% endcomment %}
"{{ post.title | prepend:"ietf-" | slugify }}": {
"title": "{{ post.title | xml_escape }}",
"url": "{{ post.url | xml_escape }}",
"link": "{{ post.status | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
{% unless forloop.last %},{% endunless %}
{% endfor %}
{% unless ietf_cnt == 0 %},{% endunless %}
"#": {}
}