|
|
@@ -48,6 +48,7 @@ |
|
|
|
<script id="search-index" type="application/json"> |
|
|
|
{{ search_index }} |
|
|
|
</script> |
|
|
|
<!-- French stopwords from https://github.com/stopwords-iso/stopwords-fr --> |
|
|
|
<script id="search-stop-words" type="application/json"> |
|
|
|
[ |
|
|
|
"a", "abord", "absolument", "afin", "ah", "ai", "aie", "aient", "aies", |
|
|
@@ -152,11 +153,9 @@ |
|
|
|
* https://gomakethings.com/how-to-update-the-url-of-a-page-without-causing-a-reload-using-vanilla-javascript/ |
|
|
|
*/ |
|
|
|
(function () { |
|
|
|
// Retrieving the index from JSON. |
|
|
|
// Retrieving the search index and stopwords from JSON. |
|
|
|
// See https://v8.dev/blog/cost-of-javascript-2019#json |
|
|
|
let searchIndex = JSON.parse(document.getElementById('search-index').textContent) |
|
|
|
|
|
|
|
// French stopwords from https://github.com/stopwords-iso/stopwords-fr |
|
|
|
let stopWords = JSON.parse(document.getElementById('search-stop-words').textContent) |
|
|
|
|
|
|
|
// Get the DOM elements |