We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2dae3a9 commit 878ee21Copy full SHA for 878ee21
generateRoutes.js
@@ -3,6 +3,8 @@ import path from "path";
3
import fs from "fs";
4
5
const indexPage = fs.readFileSync("./dist/index.html", "utf-8");
6
+const BASE_URL = "https://lnreader.github.io/";
7
+let siteMapContent = "";
8
for (const route of routes) {
9
const routePage = indexPage
10
.replace(/<title>.+<\/title>/, `<title>${route.title}</title>`)
@@ -16,4 +18,6 @@ for (const route of routes) {
16
18
fs.mkdirSync(dir, { recursive: true });
17
19
}
20
fs.writeFileSync(filePath, routePage, "utf-8");
21
+ siteMapContent += `${BASE_URL}${route.path}\n`;
22
23
+fs.writeFileSync("./dist/sitemap.txt", siteMapContent, "utf-8");
0 commit comments