Add check for identical duplicate entries in global navigation
What does this MR do and why?
Because duplicate navigation items don't behave correctly, this MR:
- Fixes instances of identical duplicate identical navigation items.
- Adds a shell script to check for future identical duplicate navigation items.
- Adds shell script to:
- Lefthook configuration so that folks that have identical duplicated navigation items can catch them before kicking off a pipeline.
- Adds shells script to
Makefile
, so it can be run withmake test
. - Run
make
target in pipelines, to eliminate regressions.
This check doesn't find instances of duplicate navigation items that are differentiated using a trailing anchor tag.
How to set up and validate locally
-
Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md. -
Check out this branch. -
Run make check-global-navigation
. Test passes. -
Duplicate a navigation item in content/_data/navigation.yaml
. -
Run make check-global-navigation
. Test fails.
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