From 10260278b32d80aca7b2670b8af8c2c26804ef7f Mon Sep 17 00:00:00 2001 From: Peter Muessig Date: Mon, 24 Feb 2025 21:08:46 +0100 Subject: [PATCH] fix: update relative paths of README.md files --- tools/prepare-gh-pages.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/prepare-gh-pages.js b/tools/prepare-gh-pages.js index f9209b6c..06dce61c 100644 --- a/tools/prepare-gh-pages.js +++ b/tools/prepare-gh-pages.js @@ -50,7 +50,7 @@ function zipDirectory(sourceDir, outPath) { } function rewriteLinks(file, path) { - let content = `---\npermalink: ${path ? path.replace(".md", ".html") : "index.html"}\n---\n\n${readFileSync(file, { encoding: "utf8"})}`; + let content = `---\npermalink: ${path ? `build/${path.replace(".md", ".html")}` : "index.html"}\n---\n\n${readFileSync(file, { encoding: "utf8"})}`; content = content.replace(/steps\/(\d{2})/g, "build/$1"); content = content.replace(/\.\.\/(\d{2})/g, "../$1"); content = content.replace(/README\.md/g, "README.html");