mirror of
https://github.com/sveltejs/svelte.git
synced 2024-11-29 16:36:44 +01:00
Merge pull request #2087 from sveltejs/gh-2085
fix invalid blog rss feed
This commit is contained in:
commit
845dd47fe8
@ -4,7 +4,7 @@ const months = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split( ',' );
|
||||
|
||||
function formatPubdate(str) {
|
||||
const [y, m, d] = str.split('-');
|
||||
return `${d} ${months[+m]} ${y}`;
|
||||
return `${d} ${months[+m]} ${y} 12:00 +0000`;
|
||||
}
|
||||
|
||||
const rss = `
|
||||
@ -27,7 +27,7 @@ const rss = `
|
||||
<description>${post.metadata.description}</description>
|
||||
<pubDate>${formatPubdate(post.metadata.pubdate)}</pubDate>
|
||||
</item>
|
||||
` )}
|
||||
`).join('')}
|
||||
</channel>
|
||||
|
||||
</rss>
|
||||
|
Loading…
Reference in New Issue
Block a user