Skip to content

Commit eb70f3c

Browse files
committed
update
update
1 parent 95338f6 commit eb70f3c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/scripts/help-to-md.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ for f in "$SRC_DIR"/*.html; do
5858
perl "$SCRIPT_DIR/help-to-md-postprocess.pl" "$out" "$map_file"
5959
rm -f "$map_file" "$tmp_preprocessed" 2>/dev/null
6060

61-
# 4. 调整内部链接以适配 GitHub Wiki
61+
# 4. 调整内部链接以适配 GitHub Wiki,统一使用 home(不用 index)
6262
perl -pi -e '
6363
s/\]\(((?!https?:\/\/)[^)]*?)index\.html(\))/\]\(\1home\2/g;
6464
s/\]\(((?!https?:\/\/)[^)]*?)index\.html(#)/\]\(\1home\2/g;
@@ -68,6 +68,8 @@ for f in "$SRC_DIR"/*.html; do
6868
s/\]\(home\)/\](home.md)/g;
6969
s/href="index\.html"/href="home"/g;
7070
s/href="index\.html#/href="home#/g;
71+
s/href="home#index"/href="home"/g;
72+
s/id="index"/id="home"/g;
7173
' "$out" 2>/dev/null || true
7274
done
7375

.github/workflows/help-to-wiki.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
perl "$SCRIPT_DIR/help-to-md-postprocess.pl" "$out" "$map_file"
6969
rm -f "$map_file" "$tmp_preprocessed" 2>/dev/null || true
7070
71-
# 4. 调整内部链接以适配 GitHub Wiki
71+
# 4. 调整内部链接以适配 GitHub Wiki,统一使用 home(不用 index)
7272
perl -pi -e '
7373
s/\]\(((?!https?:\/\/)[^)]*?)index\.html(\))/\]\(\1home\2/g;
7474
s/\]\(((?!https?:\/\/)[^)]*?)index\.html(#)/\]\(\1home\2/g;
@@ -78,6 +78,8 @@ jobs:
7878
s/\]\(home\)/\](home.md)/g;
7979
s/href="index\.html"/href="home"/g;
8080
s/href="index\.html#/href="home#/g;
81+
s/href="home#index"/href="home"/g;
82+
s/id="index"/id="home"/g;
8183
' "$out" 2>/dev/null || true
8284
done
8385

0 commit comments

Comments
 (0)