Skip to content

Commit 1fd6129

Browse files
authored
Fix relative links in the generated documentation. [skip ci]
1 parent 6f15906 commit 1fd6129

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

script/gen-docs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ cp ../Logo/PNG/logo-Swift.png ${DOC_PATH}/Logo/PNG/logo-Swift.png
6666
cp ../Logo/PNG/JoinSlack.png ${DOC_PATH}/Logo/PNG/JoinSlack.png
6767
cp ../Logo/PNG/Docs.png ${DOC_PATH}/Logo/PNG/Docs.png
6868

69+
# Fix all readme links.
70+
perl -0777 -i -pe 's/"Documentation\/([a-zA-Z0-9-_]+)\.md/"\L$1\.html/g' ${DOC_PATH}/*.html
71+
perl -0777 -i -pe 's/"(a-zA-Z0-9-_]+)\.md/"\L$1\.html/g' ${DOC_PATH}/*.html
72+
6973
git add ${DOC_PATH}
7074

7175
# Ensure Jekyll is not running in `docs`.

0 commit comments

Comments
 (0)