File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff 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
7274done
7375
Original file line number Diff line number Diff line change 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;
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
You can’t perform that action at this time.
0 commit comments