From d76aebed075e59610caee8480f5235bb72167cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Svantesson?= Date: Wed, 5 Aug 2026 19:02:29 +0200 Subject: [PATCH] fix(algolia): don't fail to populate search container if one is "missing" Upgrading docsearch since v3 isn't maintained indexName is deprecated: https://docsearch.algolia.com/docs/api#indexname Removing integrity as per https://www.jsdelivr.com/using-sri-with-dynamic-files --- docsy.dev/content/en/docs/content/search.md | 10 ++++++---- theme/layouts/_partials/head.html | 3 +-- theme/layouts/_partials/scripts.html | 16 +++++++++------- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/docsy.dev/content/en/docs/content/search.md b/docsy.dev/content/en/docs/content/search.md index 1ef8525d47..a1a39a53cc 100644 --- a/docsy.dev/content/en/docs/content/search.md +++ b/docsy.dev/content/en/docs/content/search.md @@ -164,15 +164,17 @@ disable search, just comment out or remove the relevant line. As an alternative to GCSE, you can use [Algolia DocSearch](https://docsearch.algolia.com), which is free for public -documentation sites. Docsy supports **Algolia DocSearch v3**. +documentation sites. Docsy supports **Algolia DocSearch v4**. -> [!NOTE] Algolia v2 is deprecated +> [!NOTE] Algolia v2 and v3 are deprecated > > Docsy previously supported Algolia DocSearch v2, which is now deprecated. If > you are an existing Algolia DocSearch v2 user and want to use the latest Docsy > version, follow the > [migration instructions](https://docsearch.algolia.com/docs/v3/migrating-from-v2) > in the DocSearch documentation to update your DocSearch code snippet. +> +> Upgrade from v3 to v4 shouldn't require any changes. ### Sign up for Algolia DocSearch @@ -228,8 +230,8 @@ params: -To learn more about Algolia DocSearch V3, see -[Getting started](https://docsearch.algolia.com/docs/v3/docsearch). +To learn more about Algolia DocSearch V4, see +[Getting started](https://docsearch.algolia.com/docs/docsearch). When you've completed these steps, Algolia search should be enabled on your site. Search results are displayed as a pop-up, so you don't need to add any diff --git a/theme/layouts/_partials/head.html b/theme/layouts/_partials/head.html index 4ef2681407..0ac8b614c7 100644 --- a/theme/layouts/_partials/head.html +++ b/theme/layouts/_partials/head.html @@ -89,8 +89,7 @@ {{ define "algolia/head" -}} {{ if and .Site.Params.search (isset .Site.Params.search "algolia") -}} - {{ end -}} diff --git a/theme/layouts/_partials/scripts.html b/theme/layouts/_partials/scripts.html index 1ab4a2337a..fb4f550848 100644 --- a/theme/layouts/_partials/scripts.html +++ b/theme/layouts/_partials/scripts.html @@ -83,18 +83,20 @@ {{ partial "hooks/body-end.html" . -}} {{ define "algolia/scripts" -}} - + {{ end -}}