From 9db74f463a37ea6e3e3d920d9afab345d8aa6ea0 Mon Sep 17 00:00:00 2001 From: Gilbert Sanchez Date: Sun, 21 Jun 2026 09:50:16 -0700 Subject: [PATCH] feat(search): add Algolia search via modal widget Integrate Algolia's Netlify crawler frontend. A magnifying-glass icon in the header (desktop) and a Search item in the mobile menu open a modal dialog hosting the Algolia autocomplete widget, giving a roomy, site-wide search experience. - Add params.algolia (appId, search-only apiKey, siteId, branch) to hugo.yaml - New partials: search.html (widget init) and search-modal.html (Alpine modal) - Load widget CSS and mount the modal + init in baseof.html; add [x-cloak] rule - Replace the per-section client-side filters on the articles, podcast, and author list views (they only matched the current page) with the global modal Co-Authored-By: Claude Opus 4.8 --- hugo.yaml | 7 +++ .../layouts/_default/authors.html | 34 ----------- .../layouts/_default/baseof.html | 6 ++ .../layouts/_default/list.html | 56 ------------------- .../layouts/partials/header.html | 16 +++++- .../layouts/partials/search-modal.html | 27 +++++++++ .../layouts/partials/search.html | 12 ++++ .../layouts/podcast/list.html | 33 ----------- 8 files changed, 67 insertions(+), 124 deletions(-) create mode 100644 themes/powershell-community/layouts/partials/search-modal.html create mode 100644 themes/powershell-community/layouts/partials/search.html diff --git a/hugo.yaml b/hugo.yaml index 6b14d1332..0c87da781 100644 --- a/hugo.yaml +++ b/hugo.yaml @@ -135,6 +135,13 @@ params: # Analytics (GitHub Pages compatible) google_analytics: "" + # Algolia search (Netlify crawler integration; search-only key, safe to commit) + algolia: + appId: "K2CHG50H47" + apiKey: "4bc832d88d1459de157de3ba1e11f1da" + siteId: "1c141042-7ddd-4dd8-87e7-cca37c9e7197" + branch: "main" + ical: timezone: UTC diff --git a/themes/powershell-community/layouts/_default/authors.html b/themes/powershell-community/layouts/_default/authors.html index fca105d32..dd59c3551 100644 --- a/themes/powershell-community/layouts/_default/authors.html +++ b/themes/powershell-community/layouts/_default/authors.html @@ -13,20 +13,6 @@

{{ .Title }}

- -
-
-
-
- - -
-
-
-
-
@@ -97,23 +83,3 @@

{{ end }} - -{{ define "scripts" }} - -{{ end }} diff --git a/themes/powershell-community/layouts/_default/baseof.html b/themes/powershell-community/layouts/_default/baseof.html index a925c91fe..3c9f8276f 100644 --- a/themes/powershell-community/layouts/_default/baseof.html +++ b/themes/powershell-community/layouts/_default/baseof.html @@ -39,6 +39,7 @@ + {{ with .Site.Params.algolia }}{{ end }}