Update docs redirect test for Hugo site
What does this MR do and why?
When the GitLab Docs website relaunches on Hugo (DONE!), page URLs will change:
- no more
eeprefix, and - no more
.htmlsuffixes
For example, https://docs.gitlab.com/ee/development/documentation/hugo_migration.html will become https://docs.gitlab.com/development/documentation/hugo_migration/.
To support this move, we need to modify lint-docs-redirects.rb:
- Update the location of navigation.yaml. The new site is in a new project, so the YAML file URL needs to reflect that.
- Update logic for translating a file path to the HTML page path on the website.
References
MR acceptance checklist
Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
How to set up and validate locally
- Check out this branch or download the script.
- Run the following against !131392 (closed) (should fail):
CI_PROJECT_PATH='gitlab-org/gitlab' CI_MERGE_REQUEST_IID=131392 scripts/lint-docs-redirects.rb
- Run the following against !171983 (merged) (should pass):
CI_PROJECT_PATH='gitlab-org/gitlab' CI_MERGE_REQUEST_IID=171983 scripts/lint-docs-redirects.rb
Edited by Sarah German