Hi all
Hi! I’m trying to implement the istant search in my site found on GitHub
I followed all steps, I can see in _site that search.json file, is correctly fetching results and being populated, but I can see no results displayed in the live page.
I need a little help on where to put these parts, because I have
_posts
| -blog
| -wiki
I tried to add the below code in _layout , in default.html, in page.html. and in a single search.html page
<script src="{{ site.baseurl }}/js/search-script.js" type="text/javascript"></script>
<!-- Configuration -->
<script>
SimpleJekyllSearch({
searchInput: document.getElementById('search-input'),
resultsContainer: document.getElementById('results-container'),
json: '{{ site.baseurl }}/'
})
</script>
<!-- Html Elements for Search -->
<div id="search-container">
<input type="text" id="search-input" placeholder="search...">
<ul id="results-container"></ul>
</div>
Inspect console shows this
While I copy pasting the code, doing some test, it worked for a while, but I’m not able to reproduce how I did
I have a testsite here
Thanks for any help