Skip to content

Backport path fixes for self-hosted docs sites to 16.9

Sarah German requested to merge archive-path-fixes-16.9 into 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.

  1. Configure a local GitLab Docs environment: https://gitlab.com/gitlab-org/gitlab-docs/-/blob/main/doc/setup.md.
  2. Set a new env var: export VER="16.9"
  3. New compile: make clean && SEARCH_BACKEND="lunr" CI_COMMIT_REF_NAME=$VER make compile
  4. 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/
  5. Move this into the public directory so we can browse it locally: mv dest/$VER public
  6. Run the local server: bundle exec nanoc view
  7. 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.

Edited by Sarah German

Merge request reports