aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/searchform.html2
-rw-r--r--templates/searchresults.html10
2 files changed, 6 insertions, 6 deletions
diff --git a/templates/searchform.html b/templates/searchform.html
index 2b4da9d..ddbb468 100644
--- a/templates/searchform.html
+++ b/templates/searchform.html
@@ -1,3 +1,3 @@
-<form action="{{root}}search/">
+<form action="{{#rawRootUrl}}search{{/rawRootUrl}}">
<input name="search_query" id="search_query" />
</form>
diff --git a/templates/searchresults.html b/templates/searchresults.html
index 0077c73..568f963 100644
--- a/templates/searchresults.html
+++ b/templates/searchresults.html
@@ -1,5 +1,5 @@
-<link rel="prefetch" href="{{root}}search-index.json" />
-<link rel="prefetch" href="{{root}}search-metadata.json" />
+<link rel="prefetch" href="{{#rawRootUrl}}search-index.json{{/rawRootUrl}}" />
+<link rel="prefetch" href="{{#rawRootUrl}}search-metadata.json{{/rawRootUrl}}" />
<div id="search_placeholder">
<p>Search is loading. If you cannot see any results after a few seconds, check that JavaScript is enabled in your browser.</p>
@@ -28,7 +28,7 @@
<p>The error description is: <span style="color: red" id="search_error_text"></span></p>
</div>
-<script src="{{root}}static/lunr.min.js"></script>
+<script src="{{#rawRootUrl}}static/lunr.min.js{{/rawRootUrl}}"></script>
<script>
lunr.QueryLexer.termSeparator = /(\p{P}|\p{S}|\p{Z}|\p{C})+/u;
@@ -117,10 +117,10 @@
}
Promise.all([
- fetch('{{root}}search-index.json').then(response => response.text()).then(text => {
+ fetch('{{#rawRootUrl}}search-index.json{{/rawRootUrl}}').then(response => response.text()).then(text => {
window.search_index = lunr.Index.load(JSON.parse(text))
}),
- fetch('{{root}}search-metadata.json').then(response => response.text()).then(text => {
+ fetch('{{#rawRootUrl}}search-metadata.json{{/rawRootUrl}}').then(response => response.text()).then(text => {
window.search_metadata = JSON.parse(text)
})
]).then(() => {