Open Oliver-Loeffler opened 1 month ago
Well, one can add the following snippet to ge a working search:
<html>
<head>
<link href="pagefind/pagefind-ui.css" rel="stylesheet">
<script src="pagefind/pagefind-ui.js"></script>
</head>
<body>
<div id="search"></div>
<script>
window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", showSubResults: true });
});
</script>
</body>
</html>
This requires that pagefind has created an index.
Users want to know whats inside Docbox. Hence a search page is needed. One option could be: https://pagefind.app/
Pagefind creates a static search index - the actual search is performed on client side.
Indexing can be as easy as:
Alternatively one can define an environment variable
PAGEFIND_SITE
pointing to/var/www/html/artifacts/
and just runnpx pagefind
.