Update breadcrumb separator
What does this MR do and why?
Fixes a minor bug with the recently-added breadcrumb metatag (!4063 (merged)). Turns out we can't use a comma as the breadcrumb separator because some pages have a comma in the title (like this one).
You can see the bug in action on the review app for the frontend breadcrumb MR in the first result: https://gps-page-trail.docs.gitlab-review.app/search/?q=hugo&page=1 (words in the page title appear as separate pages in the breadcrumb).
This MR:
- Changes the breadcrumb separator from a comma to
›
(HTML entity for these things: ›). We're going to display the breadcrumb with these anyways, and unlike a comma, that arrow character should not ever be in a page title. As a follow-up we can use Vale to check for that (currently there are no pages with these in the title). - Adds a test to check the breadcrumb metatag's content and formatting.
Closes #1678 (closed)
Screenshots, screen recordings, or links to review app
Before | After |
---|---|
Example pages:
- https://1678-breadcrumb-rspec.docs.gitlab-review.app/ee/tutorials/hugo/index.html
- https://1678-breadcrumb-rspec.docs.gitlab-review.app/ee/user/project/pages/
- https://1678-breadcrumb-rspec.docs.gitlab-review.app/ee/administration/reference_architectures/1k_users.html
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/gitlab-docs/-/blob/main/doc/setup.md -
Compile the site -
Inspect the HTML source and look at the gitlab-docs-breadcrumb
metatag. These should reflect the page's position in the global navigation, with each page in the hierarchy separated by a ›
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.
Closes #1678 (closed)
Edited by Sarah German