import send from '@polka/send'; import get_posts from '../blog/_posts.js'; 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} 12:00 +0000`; } const rss = ` Svelte blog https://svelte.dev/blog News and information about the magical disappearing UI framework https://svelte.dev/favicon.png Svelte https://svelte.dev/blog ${get_posts().filter(post => !post.metadata.draft).map(post => ` ${post.metadata.title} https://svelte.dev/blog/${post.slug} ${post.metadata.description} ${formatPubdate(post.metadata.pubdate)} `).join('')} `.replace(/>[^\S]+/gm, '>').replace(/[^\S]+