Fix base path and title in search suggestions
What does this MR do and why?
Fixes two issues with search suggestions:
- The word "Docs" was being added to every history item. We want history items to only show the page title.
- Fixes the path to the Recommended page (CI/CD reference) when the site is running on a domain with a subdirectory (e.g a versioned site, or our dev site)
Screenshots, screen recordings, or links to review app
Before | After |
---|---|
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. -
Browse around the site and visit 4+ pages so that your history prior to this MR is cleared out (we store the page info in a cookie in your browser) -
Click in the search box to see your recent history items. They should only show the title -
Run the site with a subdirectory-style URL: make view-prod
-
Visit a few pages and verify that the link to the CI/CD page in the search box goes to the CI/CD page
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 Sarah German