diff --git a/src/routes/sitemap.xml/+server.ts b/src/routes/sitemap.xml/+server.ts index 91c928e..1a166ad 100644 --- a/src/routes/sitemap.xml/+server.ts +++ b/src/routes/sitemap.xml/+server.ts @@ -1,5 +1,6 @@ import { json } from '@sveltejs/kit'; import { browseAllPost } from "$lib/content/contentApi"; +import dayjs from 'dayjs'; export async function GET() { @@ -17,7 +18,7 @@ export async function GET() { allPosts.map((_post) => { xml += '' xml += `${_post.url}` - xml += `${_post.date_updated}` + xml += `${dayjs(_post.date_updated).format('YYYY-MM-DDTHH:mm:ss[+07:00]')}` xml += `always` xml += `0.5` xml += ''