fix: update sitemap date formatting
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
This commit is contained in:
parent
d271ab9c8c
commit
9e54d3cc0b
@ -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 += '<url>'
|
||||
xml += `<loc>${_post.url}</loc>`
|
||||
xml += `<lastmod>${_post.date_updated}</lastmod>`
|
||||
xml += `<lastmod>${dayjs(_post.date_updated).format('YYYY-MM-DDTHH:mm:ss[+07:00]')}</lastmod>`
|
||||
xml += `<changefreq>always</changefreq>`
|
||||
xml += `<priority>0.5</priority>`
|
||||
xml += '</url>'
|
||||
|
Loading…
Reference in New Issue
Block a user