diff options
Diffstat (limited to 'src/server/content/sitemap.ts')
-rw-r--r-- | src/server/content/sitemap.ts | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/server/content/sitemap.ts b/src/server/content/sitemap.ts deleted file mode 100644 index c9e3ef5..0000000 --- a/src/server/content/sitemap.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { pages } from "../template/Base.js" -import setStingRoute from "../utils/setStingRoute.js" -import { doctype } from "../template/xml.js" -import { c } from "../template/vdom.js" -import { lastmod, loc, url, urlset } from "../template/sitemap.js" - -setStingRoute("/sitemap.xml", "sitemap.xml", async () => doctype({}, - c(urlset, { xmlns: new URL("http://www.sitemaps.org/schemas/sitemap/0.9") }, - ...pages.map(page => - c(url, {}, - c(loc, {}, (page.url?.href) ?? ""), - ...(page.date_mod ? [c(lastmod, {}, page.date_mod.toISOString())] : []) - ) - ) - ) -)) |