feat: Updates for search integration.
Some checks failed
CI / release (push) Failing after 2m32s

This commit is contained in:
2025-04-06 15:28:10 -04:00
parent b3a2400bc2
commit 1b29e8d833
6 changed files with 52 additions and 41 deletions

View File

@@ -1,24 +0,0 @@
const documents = null;
var loadDocuments = function () {
fetch("/static/search.json")
.then((response) => {
if (!response.ok) {
throw new Error("Failed to load search index.");
}
return response.json();
})
.then((response) => (this.documents = response))
.catch((error) => console.error(error));
};
let miniSearch = new MiniSearch({
fields: ["title", "body"],
storeFields: ["title", "url"],
});
loadDocuments();
console.log(documents);
miniSearch.addAll(documents);

File diff suppressed because one or more lines are too long

View File

@@ -1,5 +1,32 @@
:root {
--pagefind-ui-background: #0e172b;
--pagefind-ui-text: white;
/* --pagefind-ui-tag: #fd9a00; */
/* --pagefind-ui-primary: #fd9a00; */
--pagefind-ui-border: #fd9a00;
}
body {
font-family: Helvetica;
font-family: Avenir;
}
#search {
position: relative;
top: 0;
right: 0;
}
#search input:focus {
outline: none;
}
#search .pagefind-ui__drawer {
background: #3c3c3c;
border: 2px solid #fd9a00;
}
#search .pagefind-ui__message {
padding-left: 20px;
}
* {