chore(readme): rewrite links

This commit is contained in:
Elian Doran
2025-12-08 11:52:28 +02:00
parent 59513962fe
commit a4b95b45ec
2 changed files with 15 additions and 11 deletions

View File

@@ -13,7 +13,11 @@ const docsDir = join(rootDir, "docs");
async function handleBaseFile() {
// Read the README at root level.
const readmePath = join(rootDir, "README.md");
const readme = await readFile(readmePath, "utf-8");
let readme = await readFile(readmePath, "utf-8");
// Rewrite relative links.
readme = readme.replaceAll("./docs/", "./");
readme = readme.replaceAll("./README.md", "../README.md");
// Copy it into docs.
const outputPath = join(docsDir, "README.md");