import type { RequestHandler } from './$types' import { site } from '$lib/config/site' import { genPosts } from '$lib/utils/posts' const render = (): string => ` ${site.protocol + site.domain} ${genPosts() .map( post => ` ${site.protocol + site.domain + post.path} ${new Date(post.updated ?? post.published ?? post.created).toISOString()} 0.5 ` ) .join('')} ` export const prerender = true export const GET: RequestHandler = async () => new Response(render(), { headers: { 'content-type': 'application/xml; charset=utf-8' } })