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 |
|---|---|
|
|
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Review the documentation updates in search.md, this should help get you set up to run this locally -
Set yourself a GOOGLE_SEARCH_KEYenvironment variable with a valid API key (ping Sarah if you need help setting this up) -
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. -
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) -
Verify the form on the results page also returns results -
Verify the "Search the archives" dropdown functions like the production site -
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.
-
I have evaluated the MR acceptance checklist for this merge request.
Edited by Hiru Fernando

