0
0
mirror of https://github.com/sveltejs/svelte.git synced 2024-12-01 17:30:59 +01:00

Merge pull request #2087 from sveltejs/gh-2085

fix invalid blog rss feed
This commit is contained in:
Rich Harris 2019-02-17 11:05:34 -04:00 committed by GitHub
commit 845dd47fe8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,7 +4,7 @@ const months = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split( ',' );
function formatPubdate(str) { function formatPubdate(str) {
const [y, m, d] = str.split('-'); const [y, m, d] = str.split('-');
return `${d} ${months[+m]} ${y}`; return `${d} ${months[+m]} ${y} 12:00 +0000`;
} }
const rss = ` const rss = `
@ -27,7 +27,7 @@ const rss = `
<description>${post.metadata.description}</description> <description>${post.metadata.description}</description>
<pubDate>${formatPubdate(post.metadata.pubdate)}</pubDate> <pubDate>${formatPubdate(post.metadata.pubdate)}</pubDate>
</item> </item>
` )} `).join('')}
</channel> </channel>
</rss> </rss>