fix: search sidebar widget now renders Pagefind UI
The search widget was only showing a heading with an empty div. Now loads Pagefind CSS/JS and initializes the search UI. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,14 @@
|
||||
{# Pagefind search widget #}
|
||||
<div class="sidebar-widget">
|
||||
<h3 class="text-sm font-semibold text-surface-600 dark:text-surface-400 uppercase tracking-wide mb-3">Search</h3>
|
||||
<div id="search"></div>
|
||||
<link rel="stylesheet" href="/pagefind/pagefind-ui.css">
|
||||
<div id="sidebar-search"></div>
|
||||
<script src="/pagefind/pagefind-ui.js"></script>
|
||||
<script>
|
||||
window.addEventListener("DOMContentLoaded", function() {
|
||||
new PagefindUI({ element: "#sidebar-search", showSubResults: false, showImages: false });
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{% else %}
|
||||
<!-- Unknown widget type: {{ widget.type }} -->
|
||||
|
||||
Reference in New Issue
Block a user