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:
authorMarcel Amirault <mamirault@gitlab.com>2022-05-24 17:17:31 +0300
committerMarcel Amirault <mamirault@gitlab.com>2022-05-24 17:17:31 +0300
commitd6dac4b0844ba9223e642564246ca10107da5fd3 (patch)
tree57bed23a72c00fa8511e53b1569bb0d701cf40de
parent750f6ca0b7ef6fef3817e98bb53300e45a544619 (diff)
parent2f83f1bc7383511dd3ed80904c5b825f1bdf1a9d (diff)
Merge branch 'cherry-pick-0c7b52de' into '15.0'
Add Operator to normalize-links.sh (15.0 branch) See merge request gitlab-org/gitlab-docs!2723
-rw-r--r--doc/development.md2
-rwxr-xr-xscripts/normalize-links.sh12
2 files changed, 8 insertions, 6 deletions
diff --git a/doc/development.md b/doc/development.md
index 52ce70fc..87fa65de 100644
--- a/doc/development.md
+++ b/doc/development.md
@@ -175,3 +175,5 @@ 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/main/scripts/normalize-links.sh)
+ and add the new product to the `Relative URLs` and `Full URLs` sections.
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'