Skip to content

Add context to Lunr search page

Sarah German requested to merge lunr-show-version-info into main

What does this MR do and why?

Adds context to the Lunr search results page:

  • Adds the version to the page title
  • Adds a link to more information about Lunr search

Why

  • The site version is not shown elsewhere on the search page.
  • Adding a version-selector to the primary search page in !3972 (merged) gives visitors a path back to archive site searches (using Lunr) from the primary search (using Google). Since these search tools look and act differently, we should make it clear that this difference is intentional.

Related issues:

Screenshots, screen recordings, or links to review app

Review app: https://lunr-show-version-info.docs.gitlab-review.app/search/?q=style%20guide

Before After
image image

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Run a search
  3. On the results page, verify the page title includes your site version, and a link to info about lunr.js is visible below the search form.

Merge request acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Sarah German

Merge request reports