Restrict pagefind search to project.

This commit is contained in:
Michael Lipp 2025-02-24 14:03:49 +01:00
parent f236b376ae
commit ddab466fd0

View file

@ -11,11 +11,12 @@
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]--> <![endif]-->
<link href="../pagefind/pagefind-ui.css" rel="stylesheet"> <link href="/vm-operator/pagefind/pagefind-ui.css" rel="stylesheet">
<script src="../pagefind/pagefind-ui.js"></script> <script src="/vm-operator/pagefind/pagefind-ui.js"></script>
<script> <script>
window.addEventListener('DOMContentLoaded', (event) => { window.addEventListener('DOMContentLoaded', (event) => {
new PagefindUI({ element: "#search", showSubResults: true, new PagefindUI({ element: "#search", showSubResults: true,
bundlePath: "/vm-operator/pagefind/",
// See https://github.com/CloudCannon/pagefind/issues/530 // See https://github.com/CloudCannon/pagefind/issues/530
processResult: function (result) { processResult: function (result) {
if (result?.meta?.image) { if (result?.meta?.image) {