Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-docs.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axil@gitlab.com>2020-05-29 13:27:14 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2020-05-29 13:27:14 +0300
commit876781bf0fdc63e6bd223cb0357f897c712a7a07 (patch)
treef73bf314a96bc79094e345c9c3bcc9df89ae28e7
parent68a82707d74ee082a3c23cf7112e62417d520714 (diff)
parentf32739d31886027a4d6cf3ef1675cb898240e6f8 (diff)
Merge branch 'cherry-pick-c5a18c22-4' into '12.8'12.8
Cherry-pick 'normalize-frontend' into '12.8' See merge request gitlab-org/gitlab-docs!923
-rwxr-xr-xscripts/normalize-links.sh6
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'