Use Permalink property for image URLs
What does this MR do and why?
Second attempt at closing #69 (closed).
Using the .Permalink
property will work when our base URL includes a subdirectory. The previous implementation did not.
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. -
Run make view
and find a page with images, like: http://localhost:1313/technical-writing-group/gitlab-docs-hugo/operations/metrics/#metric-details -
Run make view-prod
and verify the image loads with this URL as well: http://localhost:1313/technical-writing-group/gitlab-docs-hugo/operations/metrics/#metric-details
In both cases, images should render and have absolute URL paths.
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 #69 (closed)