42 lines
1.4 KiB
HTML
42 lines
1.4 KiB
HTML
---
|
|
title: Search
|
|
permalink: /search/
|
|
excluded_in_search: true
|
|
layout: page
|
|
---
|
|
|
|
<form class="d-flex" role="search" action="/search/">
|
|
<div class="input-group">
|
|
<button class="btn btn-outline-secondary" type="submit" id="button-search"><i class="bi bi-search"></i></button>
|
|
<input type="text" name="q" class="form-control" placeholder="Search the site..." aria-label="Search the site..." aria-describedby="button-search">
|
|
</div>
|
|
</form>
|
|
|
|
<br />
|
|
|
|
<p><span id="search-process">Loading</span> results <span id="search-query-container" style="display: none;">for "<strong id="search-query"></strong>"</span></p>
|
|
|
|
<ul id="search-results"></ul>
|
|
|
|
<script>
|
|
window.data = {
|
|
{% for post in site.docs %}
|
|
{% unless post.excluded_in_search %}
|
|
{% if added %},{% endif %}
|
|
{% assign added = false %}
|
|
"{{ post.url | slugify }}": {
|
|
"id": "{{ post.url | slugify }}",
|
|
"title": "{{ post.title | xml_escape }}",
|
|
"url": "{{ post.url | xml_escape | relative_url }}",
|
|
"content": {{ post.content | strip_html | replace_regex: "[\s/\n]+"," " | strip | jsonify }}
|
|
}
|
|
{% assign added = true %}
|
|
{% endunless %}
|
|
{% endfor %}
|
|
};
|
|
</script>
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/lunr.js/0.7.0/lunr.min.js"
|
|
integrity="sha512-eWBLTdGT/I5jd80U2J0TyF2G+Fja6TiTYR6Ymeva7QgGUCy9EA/qhoppa4B/wYn7yWXZ8azgremVGtBi3EFDvg=="
|
|
crossorigin="anonymous" referrerpolicy="no-referrer"></script>
|
|
<script src="/js/search.js"></script>
|