diff --git a/src/routes/sitemap.xml/+server.js b/src/routes/sitemap.xml/+server.js new file mode 100644 index 0000000..d0bf653 --- /dev/null +++ b/src/routes/sitemap.xml/+server.js @@ -0,0 +1,41 @@ +export async function GET() { + const baseUrl = 'https://embroideryviewer.xyz'; + + const pages = [ + '', + 'about', + 'donate', + 'terms-of-service', + 'privacy-policy', + 'viewer', + ]; + + const urls = pages + .map( + (page) => ` + + ${baseUrl}/${page} + weekly + 0.8 + `, + ) + .join(''); + + const xml = ` + + ${urls} + `.trim(); + + return new Response(xml, { + headers: { + 'Content-Type': 'application/xml', + }, + }); +} diff --git a/static/robots.txt b/static/robots.txt new file mode 100644 index 0000000..deba89c --- /dev/null +++ b/static/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Sitemap: https://www.embroideryviewer.xyz/sitemap.xml \ No newline at end of file