forked from bcgov/digital-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.html
42 lines (32 loc) · 1.14 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
40
41
42
---
layout: default
title: Search
---
{% include searchbar_large.html %}
<div id="result"></div>
{% assign hiddenpages = "in-practice-examples-index,guides-github-ocio-guide,guides-index,in-practice-examples-paybc,guides-segmentation-what-is-segmentation" | split: "," %}
<script>
window.store = {
{% for collection in site.collections %}
{% assign name = collection.label %}
{% for page in site[name] %}
{% assign slugifiedurl = page.url | slugify %}
{% if hiddenpages contains slugifiedurl %}
{% continue %}
{% endif %}
"{{ slugifiedurl }}": {
"title": "{{ page.title | xml_escape }}",
"content": {{ page.content | strip_html | strip_newlines | lstrip | jsonify }},
"description": "{{ page.description | xml_escape }}",
"url": "{{ page.url | xml_escape }}"
}
// {% unless forloop.last %}
,
// {% endunless %}
{% endfor %}
{% endfor %}
};
window.siteurl = "{{ site.url }}";
</script>
<script src="{{ site.baseurl }}/static/js/lunr.min.js"></script>
<script src="{{ site.baseurl }}/static/js/search.js"></script>