Skip to content

Commit 3db2e7e

Browse files
committed
Handle quickstart.md as special case tutorial
1 parent 565bcfb commit 3db2e7e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

tools/github-to-astro.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ function transformMdBody(body: string, ctx: Context) {
8787
"](" + "https://github.com/unicode-org/icu4x/tree/" + encodeURIComponent(icu4xRef) + "/tutorials/$1)"
8888
);
8989

90+
// in a relative link specifically to quickstart.md
91+
replacementBody = replacementBody.replace(/(\[.*\])\((?!http)quickstart.md\)/g, "$1(" + sitePrefix + "/" + webDirName + "/quickstart)");
92+
9093
// in a relative link to a Markdown file, get rid of the trailing `.md`
9194
replacementBody = replacementBody.replace(/(\[.*\])\((?!http)(.*)\.md\)/g, "$1(" + sitePrefix + "/" + webDirName + "/tutorials" + "/$2)");
9295

0 commit comments

Comments
 (0)