aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMark Powers <mark@marks.kitchen>2021-09-02 19:29:54 -0500
committerMark Powers <mark@marks.kitchen>2021-09-02 19:29:54 -0500
commitdc98fdf6664645b6356b71a60edca9a07f21dff6 (patch)
tree215edd0ba275bf706db3390989820322d5577ff5 /src
parent524e521ad3548934c4effa104eb4ac1299a1816a (diff)
Fix sitemap.xml date formatting
Diffstat (limited to 'src')
-rw-r--r--src/server.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/server.js b/src/server.js
index 478e601..4e109ad 100644
--- a/src/server.js
+++ b/src/server.js
@@ -102,15 +102,15 @@ async function sitemap(models) {
"/projects",
]
routes.forEach(item => {
- urlset.push(to_sitemap_xml(host, item, Date.now()))
+ urlset.push(to_sitemap_xml(host, item, new Date().toISOString()))
})
let posts = (await models.posts.findAll()).map(x => x.get({ plain: true }));
posts.forEach(post => {
- urlset.push(to_sitemap_xml(host, `/posts/${post.type}/${post.id}`, posts.updatedAt))
+ urlset.push(to_sitemap_xml(host, `/posts/${post.type}/${post.id}`, post.updatedAt.toISOString()))
})
let tags = (await models.tags.findAll()).map(x => x.get({ plain: true }));
tags.forEach(tag => {
- urlset.push(to_sitemap_xml(host, `/tags/${tag.text}`, tag.updatedAt))
+ urlset.push(to_sitemap_xml(host, `/tags/${tag.text}`, tag.updatedAt.toISOString()))
})
return `<urlset>${urlset.join("")}</urlset>`;
}