forked from usnistgov/mobile-threat-catalogue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.html
39 lines (36 loc) · 1.59 KB
/
search.html
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
---
layout: page
title: Search
---
<h1>Search</h1>
<ul id="search-results" class="threat-list"></ul>
<script>
window.store = {
{% assign documents = site.documents | where: 'merged', true %}
{% for document in documents %}
"{{ document.url | slugify }}": {
"ThreatID": "{{ document.ID | xml_escape }}",
"ThreatCategory": "{{ document.ThreatCategory | xml_escape }}",
"Threat": "{{ document.Threat | xml_escape }}",
"ThreatOrigin": "{{ document.ThreatOrigin | jsonify | smartify | xml_escape }}",
"ExploitExample": "{{ document.ExploitExample | jsonify | smartify | xml_escape }}",
"CVEExample": "{{ document.CVEExample | jsonify | smartify | xml_escape }}",
"PossibleCountermeasures": "{{ document.PossibleCountermeasures | jsonify | smartify | xml_escape }}",
"url": "{{ site.baseurl }}{{ document.url | xml_escape }}"
}
{% unless forloop.last %},{% endunless %}
{% endfor %}
};
window.acronym_store = {
{% assign documents = site.data.glossary-terms %}
{% for document in documents %}
"{{ document.term }}": {
"Term": "{{ document.term }}",
"Definition": "{{ document.definition }}",
"url": "{{ site.baseurl }}/acronyms.html#{{ document.term }}"
}{% unless forloop.last %},{% endunless %}
{% endfor %}
};
</script>
<script src="{{ site.baseurl }}/js/lunr.min.js"></script>
<script src="{{ site.baseurl }}/js/search.js"></script>