Add template partial for legacy path
What does this MR do and why?
- Adds a template partial to find the legacy URL for the page. We'll need this for the Versions menu so that links to pre-Hugo versions will still work.
- Refactors the
edit-link
shortcode so that we can share thepage-source-project
function between these two templates.
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/technical-writing-group/gitlab-docs-hugo/-/blob/main/doc/setup.md. -
Visit a few pages from each source project, and verify:
- The "Edit page" links in the footer still work
- The
gitlab-docs-legacy-path
metatag contains the path to this page that works on the Nanoc site. Pages from the GitLab repo will have the/ee
prefix here, and pages that end with.html
extensions include these in the metatag.
Example pages from each project:
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