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>2022-05-23 17:36:49 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2022-05-24 00:01:24 +0300
commit0df4644c9ffebc76ccf8acea44a323fb120bebb0 (patch)
tree9f41b39906227be741f94d30e0c563366c8c487f
parentc2885834883207fa95987b1aab5aeb43b5b1a8f3 (diff)
Add Operator to normalize-links.shaxil-operator-normalize-script
-rw-r--r--doc/development.md1
-rwxr-xr-xscripts/normalize-links.sh12
2 files changed, 7 insertions, 6 deletions
diff --git a/doc/development.md b/doc/development.md
index 52ce70fc..eae97611 100644
--- a/doc/development.md
+++ b/doc/development.md
@@ -175,3 +175,4 @@ To add an additional set of product documentation to <https://docs.gitlab.com> f
```
1. Edit the [`Rakefile`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/68814c875e322b1871d6368135af49794041ddd1/Rakefile#L107-113) and add a line to replace the product's branch variable. If the product doesn't have a stable branch process, omit this step to use the product's default branch.
+1. Edit [`scripts/normalize-links.sh`](https://gitlab.com/gitlab-org/gitlab-docs/-/blob/0ed094106449fcf983a35a75f99cccc135f1810c/scripts/normalize-links.sh) and add the new product in the relative and full URLs `sed` commands.
diff --git a/scripts/normalize-links.sh b/scripts/normalize-links.sh
index 0e35e022..3f5d8e46 100755
--- a/scripts/normalize-links.sh
+++ b/scripts/normalize-links.sh
@@ -33,9 +33,6 @@ fi
##
## Relative URLs
##
-echo "Replace relative URLs in $TARGET/$VER for /ce/"
-find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/ce/#="/'"$VER"'/ce/#g'
-
echo "Replace relative URLs in $TARGET/$VER for /ee/"
find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/ee/#="/'"$VER"'/ee/#g'
@@ -48,6 +45,9 @@ find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/omnib
echo "Replace relative URLs in $TARGET/$VER for /charts/"
find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/charts/#="/'"$VER"'/charts/#g'
+echo "Replace relative URLs in $TARGET/$VER for /operator/"
+find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/operator/#="/'"$VER"'/operator/#g'
+
echo "Replace relative URLs in $TARGET/$VER for /assets/"
find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/assets/#="/'"$VER"'/assets/#g'
@@ -63,9 +63,6 @@ find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="/opens
##
## Full URLs
##
-echo "Replace full URLs in $TARGET/$VER for /ce/"
-find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="https://docs.gitlab.com/ce/#="/'"$VER"'/ce/#g'
-
echo "Replace full URLs in $TARGET/$VER for /ee/"
find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="https://docs.gitlab.com/ee/#="/'"$VER"'/ee/#g'
@@ -78,6 +75,9 @@ find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="https:
echo "Replace full URLs in $TARGET/$VER for /charts/"
find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="https://docs.gitlab.com/charts/#="/'"$VER"'/charts/#g'
+echo "Replace full URLs in $TARGET/$VER for /operator/"
+find ${TARGET}/$VER -type f -name '*.html' -print0 | xargs -0 sed -i 's#="https://docs.gitlab.com/operator/#="/'"$VER"'/operator/#g'
+
echo "Fix URLs inside the sitemap"
find ${TARGET}/$VER -type f -name 'sitemap.xml' -print0 | xargs -0 sed -i 's#docs.gitlab.com/#docs.gitlab.com/'"$VER"'/#g'