Add breadcrumb metadata to pages
What does this MR do and why?
Adds navigation metadata for each page per the schema.org breadcrumbList spec. This is used by search engines and can also be used in our own site search results. This will allow for visitors to better differentiate pages with similar titles in search results.
Screenshots, screen recordings, or links to review app
level 1 menu item | level 2 menu item | level 6 menu item |
---|---|---|
Note: On the review app (and production), HTML is minified, so these won't have line breaks or indentation (but should still pass the validator test).
Example review app URLs:
- level 1: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/user/ai_features.html
- level 2: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/administration/get_started.html
- level 3: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/administration/feature_flags.html
- level 4: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/tutorials/container_scanning/
- level 5: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/user/application_security/dast/checks/
- level 6: https://1370-breadcrumb-metadata.docs.gitlab-review.app/ee/topics/autodevops/multiple_clusters_auto_devops.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. -
Inspect HTML source for pages of a few varying levels in the navigation. Check that items in the BreadcrumbList
JSON object properly reflect the hierarchy of the page in the global nav. -
Check that the JSON object is valid by copy/pasting into the "code snippet" tab of the Schema Markup Validator: https://validator.schema.org/
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 #1370 (closed)
Edited by Sarah German