If I create a search page with shortcode of wp-static-search, everything loads in static except 3 files…. which are….worker.js which should load 2 lunr files and is supposed to load from search.js through these lines…
function onWorkerMessage(e) {
if (e.data.allowSearch) {
initSearch();
} else if (e.data.results) {
var results = e.data.results;
displayResults(results);
} else if (e.data.config) {
// min_search_length = e.data.config.min_search_length-1;
}
}
if (!window.Worker) {
console.log('Web Worker API not supported');
// load index in main thread
affixScriptToHead(appStaticSearch.siteUrl + "/wp-content/plugins/wp-static-search/js/worker.js?ver=0.0.1").done(function () {
console.log('Loaded worker');
init(appStaticSearch.indexVersion);
window.postMessage = function (msg) {
onWorkerMessage({data: msg});
};
}).fail(function (jqxhr, settings, exception) {
console.error('Could not load worker.js');
});
} else {
// Wrap search in a web worker
searchWorker = new Worker(appStaticSearch.siteUrl + "/wp-content/plugins/wp-static-search/js/worker.js?ver=0.0.1");
searchWorker.postMessage({init: {version: appStaticSearch.indexVersion}});
searchWorker.onmessage = onWorkerMessage;
The static search worked on a host. (opening files in browser didn’t work).
and I found fix for broken links in support of the plugin.
https://wordpress.org/support/topic/fix-for-broken-links-in-search-results/