fix sitemap

This commit is contained in:
Raven Scott 2024-09-26 00:20:26 -04:00
parent 9c3957c8f0
commit e0bc9509d1

2
app.js
View File

@ -271,7 +271,7 @@ app.get('/sitemap.xml', (req, res) => {
let sitemap = `<?xml version="1.0" encoding="UTF-8"?>\n<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">\n`;
urls.forEach(({ url, lastmod, changefreq, priority }) => {
sitemap += ` <url>\n`;
sitemap += ` <loc>https://${hostname}${url}</loc>\n`;
sitemap += ` <loc>https://${url}</loc>\n`;
if (lastmod) {
sitemap += ` <lastmod>${lastmod}</lastmod>\n`;
}