fix: include index.html in sitemap

closes #325
This commit is contained in:
Danny Koppenhagen
2023-02-06 21:27:19 +01:00
committed by Bastian
parent 5411e8c041
commit d2e540035a
2 changed files with 14 additions and 9 deletions

View File

@@ -40,6 +40,12 @@ const createStaticFiles = async () => {
});
const sitemap = new XmlSitemap();
const sitemapOptions = {
lastmod: "now",
changefreq: "weekly",
}
sitemap.add(`${publicUrl}/index.html`, sitemapOptions);
radar.items.forEach((item) => {
copyFileSync(
@@ -47,10 +53,7 @@ const createStaticFiles = async () => {
`build/${item.quadrant}/${item.name}.html`
);
sitemap.add(`${publicUrl}${item.quadrant}/${item.name}.html`, {
lastmod: "now",
changefreq: "weekly",
});
sitemap.add(`${publicUrl}${item.quadrant}/${item.name}.html`, sitemapOptions);
});
writeFileSync("build/sitemap.xml", sitemap.xml);