From f262293135454214ae4ed6b9fcfc8fdc559aec23 Mon Sep 17 00:00:00 2001 From: Conduitry Date: Fri, 15 Feb 2019 16:36:04 -0500 Subject: [PATCH] site: fix invalid blog rss feed (#2085) and tidy --- site/src/routes/blog/rss.xml.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/site/src/routes/blog/rss.xml.js b/site/src/routes/blog/rss.xml.js index c95acf3c27..135e70499f 100644 --- a/site/src/routes/blog/rss.xml.js +++ b/site/src/routes/blog/rss.xml.js @@ -1,10 +1,10 @@ import get_posts from '../api/blog/_posts.js'; -const months = ',Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec'.split( ',' ); +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}`; +function formatPubdate(str) { + const [y, m, d] = str.split('-'); + return `${d} ${months[+m]} ${y} 12:00 +0000`; } const rss = ` @@ -20,18 +20,18 @@ const rss = ` Svelte https://svelte.technology/blog - ${get_posts().map( post => ` + ${get_posts().map(post => ` ${post.metadata.title} https://svelte.technology/blog/${post.slug} ${post.metadata.description} ${formatPubdate(post.metadata.pubdate)} - ` )} + `).join('')} -`.replace( />[^\S]+/gm, '>' ).replace( /[^\S]+[^\S]+/gm, '>').replace(/[^\S]+