Fix some sed substitutions in post-process script
What does this MR do and why?
In !3701 (merged), we made the script more compact and quick by changing how sed
substituted the strings. Unfortunately, some substitutions didn't follow the same regex as previously, and that led to having the SVGs not shown in the homepage.
You can verify by viewing the page source of https://docs.gitlab.com/15.11/ and searching for src="/assets
. Normally, you shouldn't see any results as this should have been src="/15.11/assets
.
Fortunately, this only affects the 15.11 image and folks that download and run it locally, which would be virtually no one
This change brings back the substitutions that we used before, thus fixing the issue.
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.
- Pull the 15.11 image and run it locally:
docker run -it --rm -p 4000:4000 registry.gitlab.com/gitlab-org/gitlab-docs:15.11
- Visit the site at http://0.0.0.0:4000 and notice the images not shown.
- Check out this branch.
- Build the 15.11 image with the new change:
docker build --build-arg NANOC_ENV=production --build-arg VER=15.11 --build-arg SEARCH_BACKEND="lunr" --tag docs:15.11 -f dockerfiles/single.Dockerfile .
- Run the image:
docker run -it --rm -p 4000:4000 docs:15.11
- Visit the site at http://0.0.0.0:4000 and verify that the images in the homepage show correctly.
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.