forked from snxraven/ravenscott-blog
update code
This commit is contained in:
parent
348ef3245d
commit
dbdd34f521
6
app.js
6
app.js
@ -257,7 +257,7 @@ app.get('/sitemap.xml', (req, res) => {
|
|||||||
const lastModifiedDate = format(new Date(stats.birthtime), 'yyyy-MM-dd');
|
const lastModifiedDate = format(new Date(stats.birthtime), 'yyyy-MM-dd');
|
||||||
|
|
||||||
return {
|
return {
|
||||||
url: `/blog/${slug}`,
|
url: `https://blog.raven-scott.fyi/${slug}`,
|
||||||
lastmod: lastModifiedDate,
|
lastmod: lastModifiedDate,
|
||||||
changefreq: 'monthly',
|
changefreq: 'monthly',
|
||||||
priority: 0.9
|
priority: 0.9
|
||||||
@ -319,10 +319,10 @@ app.get('/rss', (req, res) => {
|
|||||||
// RSS item for each post
|
// RSS item for each post
|
||||||
rssFeed += `<item>\n`;
|
rssFeed += `<item>\n`;
|
||||||
rssFeed += `<title>${title}</title>\n`;
|
rssFeed += `<title>${title}</title>\n`;
|
||||||
rssFeed += `<link>https://${hostname}/blog/${slug}</link>\n`;
|
rssFeed += `<link>https://blog.raven-scott.fyi/${slug}</link>\n`;
|
||||||
rssFeed += `<description>${lead || 'Read the full post on the blog.'}</description>\n`;
|
rssFeed += `<description>${lead || 'Read the full post on the blog.'}</description>\n`;
|
||||||
rssFeed += `<pubDate>${lastModifiedDate}</pubDate>\n`;
|
rssFeed += `<pubDate>${lastModifiedDate}</pubDate>\n`;
|
||||||
rssFeed += `<guid>https://${hostname}/blog/${slug}</guid>\n`;
|
rssFeed += `<guid>https://blog.raven-scott.fyi/${slug}</guid>\n`;
|
||||||
rssFeed += `</item>\n`;
|
rssFeed += `</item>\n`;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user