Skip to content

Fix search results filtering to match currently viewed version#192

Merged
riccardobl merged 2 commits into
masterfrom
copilot/fix-search-bar-link-version
Apr 4, 2026
Merged

Fix search results filtering to match currently viewed version#192
riccardobl merged 2 commits into
masterfrom
copilot/fix-search-bar-link-version

Conversation

Copilot AI commented Apr 4, 2026

Copy link
Copy Markdown
Contributor

Search results always linked to v3.4 pages regardless of which version the user was currently browsing, due to missing version filtering in the Algolia DocSearch configuration.

Change

Added facetFilters to the DocSearch algoliaOptions in supplemental-ui/partials/footer-content.hbs, using the Antora {{page.version}} template variable to scope results to the active version at build time:

- algoliaOptions: { hitsPerPage: 10 }
+ algoliaOptions: { hitsPerPage: 10, facetFilters: ['version:{{page.version}}'] }

Each built page now embeds its own version string (e.g., version:3.8), so search results are constrained to the version the user is currently viewing.

Copilot AI linked an issue Apr 4, 2026 that may be closed by this pull request
Copilot AI changed the title [WIP] Fix search bar linking to older version Fix search results filtering to match currently viewed version Apr 4, 2026
Copilot AI requested a review from riccardobl April 4, 2026 09:38
@riccardobl riccardobl marked this pull request as ready for review April 4, 2026 09:40
@riccardobl riccardobl merged commit cc8598b into master Apr 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

the search bar links to older versions

2 participants