Skip to content

Commit 5a07c47

Browse files
authored
Merge pull request #208 from yuanyl630/feat/remove-nested-v5.1-structure
remove the directory v5.1
2 parents 818da3b + 32cc436 commit 5a07c47

File tree

158 files changed

+226
-222
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+226
-222
lines changed

.github/workflows/merge-build-push.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,8 @@ jobs:
8484
echo # Newline for better readability
8585
8686
if [[ -n "$DETECTED_VERSION" ]]; then
87-
NEW_START_PAGE="${START_PAGE_COMPONENT_NAME}::v${DETECTED_VERSION}/${START_PAGE_FILE_PATH}"
87+
# All branches use flat structure (single-level path): ivorysql-doc:v5.1:welcome.adoc
88+
NEW_START_PAGE="${START_PAGE_COMPONENT_NAME}:v${DETECTED_VERSION}:${START_PAGE_FILE_PATH}"
8889
yq -i ".site.start_page = \"$NEW_START_PAGE\"" "$PLAYBOOK_FILE"
8990
echo "Updated .site.start_page in $PLAYBOOK_FILE to: $NEW_START_PAGE"
9091
else
@@ -133,7 +134,9 @@ jobs:
133134
set -euo pipefail
134135
135136
TARGET_BRANCH="v${LATEST_VERSION}"
136-
EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/v${LATEST_VERSION}/welcome.html"
137+
138+
# All versions use flat structure (single-level path): ivorysql-doc/v5.1/welcome.html
139+
EXPECTED_PATH="ivorysql-doc/v${LATEST_VERSION}/welcome.html"
137140
138141
if [[ "${MERGED_PR_BASE}" != "${TARGET_BRANCH}" ]]; then
139142
echo "Base branch ${MERGED_PR_BASE} is not the latest version branch ${TARGET_BRANCH}, skip index redirect check."
@@ -152,8 +155,9 @@ jobs:
152155
if grep -q "${EXPECTED_PATH}" "${FILE_PATH}"; then
153156
echo "${FILE_PATH} already points to latest ${LATEST_VERSION}."
154157
else
155-
# Replace all version segments like vX.Y or vX.Y.Z in href/location/meta/script targets
156-
sed -i -E "s@ivorysql-doc/v[0-9]+(\\.[0-9]+){1,2}/v[0-9]+(\\.[0-9]+){1,2}/welcome\\.html@${EXPECTED_PATH}@g" "${FILE_PATH}"
158+
# Replace path to latest version
159+
# Handle both old double-level and new single-level path formats
160+
sed -i -E "s@ivorysql-doc/v[0-9]+(\\.[0-9]+){1,2}/(v[0-9]+(\\.[0-9]+){1,2}/)?welcome\\.html@${EXPECTED_PATH}@g" "${FILE_PATH}"
157161
UPDATE_NEEDED=true
158162
echo "Updated ${FILE_PATH} to latest ${LATEST_VERSION} redirect."
159163
fi

CN/antora.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: ivorysql-doc
22
title: 文档中心
33
version: v5.1
4-
start_page: v5.1/welcome.adoc
4+
start_page: welcome.adoc
55
asciidoc:
66
attributes:
77
source-language: asciidoc@

CN/modules/ROOT/nav.adoc

Lines changed: 75 additions & 75 deletions
Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)