This commit is contained in:
geoffsee
2025-05-22 23:14:01 -04:00
commit 33679583af
242 changed files with 15090 additions and 0 deletions

30
scripts/gen_sitemap.js Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bun
import fs from "fs";
const currentDate = new Date().toISOString().split("T")[0];
const sitemapTemplate = `<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 ">
<url>
<loc>https://geoff.seemueller.io/</loc>
<lastmod>${currentDate}</lastmod>
<priority>1.0</priority>
</url>
<url>
<loc>https://geoff.seemueller.io/connect</loc>
<lastmod>${currentDate}</lastmod>
<priority>0.7</priority>
</url>
</urlset>`;
const sitemapPath = "./public/sitemap.xml";
fs.writeFile(sitemapPath, sitemapTemplate, (err) => {
if (err) {
console.error("Error writing sitemap file:", err);
process.exit(1);
}
console.log("Sitemap updated successfully with current date:", currentDate);
});