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>2018-03-23 15:46:35 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2018-03-23 15:46:35 +0300
commit6d920e7295e115211a0cf3982ad44aa8e0ddfa79 (patch)
tree4ab80457e0b464a57269cf1610bb206cab7f53cc /scripts
parent0d8f96cac73873b9e8cc3bf622cac5ee13120c48 (diff)
Normalize archive links for robots.txt and sitemap.xml
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/normalize-links.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/normalize-links.sh b/scripts/normalize-links.sh
index a6b2a34d..8eca82cf 100755
--- a/scripts/normalize-links.sh
+++ b/scripts/normalize-links.sh
@@ -27,6 +27,8 @@ find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/runner/#="
find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/omnibus/#="/'"$VER"'/omnibus/#g'
find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/assets/#="/'"$VER"'/assets/#g'
find ${TARGET} -type f -name '*.html' -print0 | xargs -0 sed -i 's#<a href="/">#<a href="/'"$VER"'/">#g'
+sed -i 's#/sitemap.xml#/'"$VER"'/sitemap.xml/#g' ${TARGET}/robots.txt
+sed -i 's#docs.gitlab.com/#docs.gitlab.com/'"$VER"'/#g' ${TARGET}/sitemap.xml
# Symlink all README.html to index.html
for i in `find ${TARGET}/${VER} -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done