mirror of
https://github.com/saicaca/fuwari.git
synced 2026-01-11 14:52:52 +01:00
fix: don't load Pagefind and return fake search results for dev environment
This commit is contained in:
@@ -122,15 +122,15 @@ document.addEventListener('astro:after-swap', () => {
|
||||
loadButtonScript();
|
||||
}, { once: false });
|
||||
</script>
|
||||
<script is:raw>
|
||||
|
||||
{import.meta.env.PROD && <script is:raw>
|
||||
async function loadPagefind() {
|
||||
console.log('load')
|
||||
const pagefind = await import("/pagefind/pagefind.js");
|
||||
const pagefind = await import("/pagefind/pagefind.js")
|
||||
await pagefind.options({
|
||||
"excerptLength": 20
|
||||
})
|
||||
pagefind.init();
|
||||
pagefind.init()
|
||||
window.pagefind = pagefind
|
||||
}
|
||||
loadPagefind()
|
||||
</script>
|
||||
</script>}
|
||||
Reference in New Issue
Block a user