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:
commit
845dd47fe8
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user