Skip to content

Add search results page

What does this MR do and why?

  • Copies over the search results page components from the Nanoc site. No major adjustments were needed on these, just some Tailwind class name updates
  • Copies over exported search config from Google
  • Copies over search-related documentation (search.md) with a few adjustments

Note: Because Google is crawling docs.gitlab.com, links on search results are not going to work: they use paths that match the old site. We will need to get redirects implemented (#88 (closed)) for these to be operational.

Screenshots, screen recordings, or links to review app

Nanoc site Hugo site
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/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md.
  2. Review the documentation updates in search.md, this should help get you set up to run this locally
  3. Set yourself a GOOGLE_SEARCH_KEY environment variable with a valid API key (ping Sarah if you need help setting this up)
  4. Test the search forms on the homepage and interior page navbar: queries should return results or "no results found," just like the production site. Results are selectable using the keyboard. Hitting Enter will take you to the full results page.
  5. Verify that the results page looks like the production version (there are some small spacing differences due to the different container width, this version is a little wider; this is OK as long as nothing looks broken)
  6. Verify the form on the results page also returns results
  7. Verify the "Search the archives" dropdown functions like the production site
  8. Verify the section filters function like the production site

Note that links to actual result links will not work yet (see description).

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 Hiru Fernando

Merge request reports

Loading