39 lines
1.0 KiB
TypeScript
39 lines
1.0 KiB
TypeScript
import { APIEvent } from "@solidjs/start/server";
|
|
|
|
export async function GET(event: APIEvent) {
|
|
const sitemap = `<?xml version="1.0" encoding="UTF-8"?>
|
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
<url>
|
|
<loc>https://www.freno.me</loc>
|
|
<lastmod>${new Date().toISOString()}</lastmod>
|
|
<changefreq>weekly</changefreq>
|
|
<priority>1.0</priority>
|
|
</url>
|
|
<url>
|
|
<loc>https://www.freno.me/blog</loc>
|
|
<lastmod>${new Date().toISOString()}</lastmod>
|
|
<changefreq>daily</changefreq>
|
|
<priority>0.9</priority>
|
|
</url>
|
|
<url>
|
|
<loc>https://www.freno.me/contact</loc>
|
|
<lastmod>${new Date().toISOString()}</lastmod>
|
|
<changefreq>monthly</changefreq>
|
|
<priority>0.7</priority>
|
|
</url>
|
|
<url>
|
|
<loc>https://www.freno.me/login</loc>
|
|
<lastmod>${new Date().toISOString()}</lastmod>
|
|
<changefreq>monthly</changefreq>
|
|
<priority>0.5</priority>
|
|
</url>
|
|
</urlset>`;
|
|
|
|
return new Response(sitemap, {
|
|
headers: {
|
|
"Content-Type": "application/xml",
|
|
"Cache-Control": "public, max-age=3600"
|
|
}
|
|
});
|
|
}
|