// We need the URL from the HTML because it gets properly updated when exporting the final version
const data = await fetch(this.$el.dataset.searchindex);
const index = await data.text();
- console.log(index);
// Delay miniSearch initialisation so there's less chance of animations stuttering during page loads
- setTimeout(() => {
- window.minisearch = this.miniSearch = MiniSearch.loadJSON(index, this.setup);
- }, 4000);
+ window.minisearch = this.miniSearch = MiniSearch.loadJSON(index, this.setup);
this.medialibrary = this.$el.dataset.medialibrary;
},