Preserve anchors in docs redirections
In gitlab!152906 (merged) @mrincon raised the below issue:
Pages does not preserve anchor links when redirecting based on entries in the _redirect
file.
@mrincon started a discussion:
> **Issue:** Not related to this MR, but the redirects don't preserve the anchors:
>
> https://docs.gitlab.com/ee/ci/pipelines/cicd_minutes.html#cost-factor
>
> Sends me to:
>
> https://docs.gitlab.com/ee/ci/pipelines/compute_minutes.html
Implementation guide
-
lines of code which may need changing:
Probably this needs to be addressed in
gitlab.com/gitlab-org/gitlab-pages
, withinredirects.go
https://gitlab.com/gitlab-org/gitlab-pages/-/blob/master/internal/redirects/redirects.go?ref_type=heads#L112 -
test coverage
Add a test for the above case to
internal/redirects/redirects_test.go
-
contribution guides:
- Contribution guide for GitLab Pages: https://docs.gitlab.com/ee/development/pages/
- Contribution guide for Golang contributions: https://docs.gitlab.com/ee/development/go_guide/
Edited by Janis Altherr