diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-29 13:17:04 +0300 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2020-05-29 13:17:04 +0300 |
commit | 5c7128f136710c404a624bfe889b85f76a0d5c76 (patch) | |
tree | 9b7aea83f0791d4e035da8f26defcaa6f51de0ac | |
parent | 03c123e0c5a8221f3b2fb61026cf77c527987674 (diff) | |
parent | 31cf5787d3bda16095fd38e6a086a59eea22a381 (diff) |
Merge branch 'cherry-pick-c5a18c22-3' into '12.9'
Cherry-pick 'normalize-frontend' into '12.9'
See merge request gitlab-org/gitlab-docs!922
-rwxr-xr-x | scripts/normalize-links.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/normalize-links.sh b/scripts/normalize-links.sh index 230f817f..518f4abc 100755 --- a/scripts/normalize-links.sh +++ b/scripts/normalize-links.sh @@ -22,7 +22,8 @@ fi ## ## In order for the version to be correct, we need to replace any occurrences -## of relative or full URLs with the respective version. +## of relative or full URLs with the respective version. Basically, prefix +## all top level directories (except archives/) under public/ with the version. ## ## ## Relative URLs @@ -45,6 +46,9 @@ find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/charts/#=" echo "Replace relative URLs in $TARGET/$VER for /assets/" find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/assets/#="/'"$VER"'/assets/#g' +echo "Replace relative URLs in $TARGET/$VER for /frontend/" +find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/frontend/#="/'"$VER"'/frontend/#g' + echo "Replace relative URLs in $TARGET/$VER for /" find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#<a href="/">#<a href="/'"$VER"'/">#g' |