Backport path fixes for self-hosted docs sites to 16.9
What does this MR do and why?
Backports the fixes in !4598 (merged) to 16.9:
- Fixes Lunr search result URLs
- Fixes the link to the homepage from the logo
- Fixes the link to the latest version from the "archived version" banner
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/gitlab-docs/-/blob/main/doc/setup.md. -
Set a new env var: export VER="16.9"
-
New compile: make clean && SEARCH_BACKEND="lunr" CI_COMMIT_REF_NAME=$VER make compile
-
Create a "release" version (this runs the same steps as we do through single.Dockerfile): ./scripts/normalize-links.sh public $VER && mkdir $VER && scripts/minify-assets.sh $VER/ public/ && mkdir dest && mv $VER dest/
-
Move this into the public directory so we can browse it locally: mv dest/$VER public
-
Run the local server: bundle exec nanoc view
-
Browse the site at http://localhost:3000/16.9 and verify version-related features* work as expected.
*
See feature table in the original MR: !4598 (merged)
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