chore: search updates
This commit is contained in:
parent
c784813d39
commit
b122f5efc7
1 changed files with 16 additions and 4 deletions
|
@ -17,10 +17,13 @@ meta:
|
|||
image:
|
||||
src: https://coryd.dev/assets/img/avatar.webp
|
||||
---
|
||||
<link href="https://coryd.dev/pagefind/pagefind-ui.css" rel="stylesheet">
|
||||
|
||||
<link href="https://coryd.dev/pagefind/pagefind-ui.css" rel="stylesheet" />
|
||||
<style>
|
||||
:root {
|
||||
--pagefind-ui-font: InterVariable, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
--pagefind-ui-font: silka, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
|
||||
Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji,
|
||||
Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
|
||||
--pagefind-ui-primary: #374151;
|
||||
--pagefind-ui-text: #374151;
|
||||
}
|
||||
|
@ -35,5 +38,14 @@ meta:
|
|||
}
|
||||
</style>
|
||||
<div id="search" class="search"></div>
|
||||
<script src="https://coryd.dev/pagefind/pagefind-ui.js" onload="new PagefindUI({ element: '#search', showImages: false})"></script>
|
||||
{% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %}
|
||||
<script
|
||||
src="https://coryd.dev/_pagefind/pagefind-ui.js"
|
||||
onload="new PagefindUI({ element: '#search', showImages: false, processTerm: (term) => {
|
||||
try{
|
||||
plausible('Search', {props: {method: 'Text', term}});
|
||||
} catch(e){};
|
||||
return term;
|
||||
}
|
||||
});"
|
||||
></script>
|
||||
{% render "partials/popular-posts.liquid", posts: collections.posts, analytics: analytics %}
|
||||
|
|
Reference in a new issue