You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove Gumroad links from landing page and footer
- Add pagefind as build dependency, runs post-build
- Wire up search dialog with live results, debounced input
- Add data-pagefind-body to chapter content for focused indexing
Co-authored-by: Ona <no-reply@ona.com>
Copy file name to clipboardExpand all lines: src/components/Footer.astro
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,6 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
11
11
<p>February 2026</p>
12
12
</div>
13
13
<divclass="flex gap-6">
14
-
<ahref="https://siddhantkhare.gumroad.com"target="_blank"rel="noopener noreferrer"class="hover:text-[var(--text-primary)] transition-colors">Buy the Book</a>
@@ -123,4 +166,42 @@ const base = import.meta.env.BASE_URL.replace(/\/$/, "");
123
166
}
124
167
if (e.key === 'Escape') closeSearch();
125
168
});
169
+
170
+
let debounceTimer: ReturnType<typeof setTimeout>;
171
+
searchInput?.addEventListener('input', () => {
172
+
clearTimeout(debounceTimer);
173
+
debounceTimer = setTimeout(async () => {
174
+
const query = searchInput.value.trim();
175
+
if (!searchResults) return;
176
+
177
+
if (!query) {
178
+
searchResults.innerHTML = '';
179
+
if (searchPlaceholder) {
180
+
searchPlaceholder.style.display = '';
181
+
searchResults.appendChild(searchPlaceholder);
182
+
}
183
+
return;
184
+
}
185
+
186
+
if (!pagefind) {
187
+
searchResults.innerHTML = '<p class="text-sm text-[var(--text-tertiary)] px-2 py-4 text-center">Search index not available. Try again after the site is built.</p>';
0 commit comments