From: Ardis Lu Date: Thu, 21 Jul 2022 02:38:50 +0000 (-0700) Subject: Adjust whitespace so the output is human-readable X-Git-Url: https://git.ardis.lu/?a=commitdiff_plain;h=9e8d24ce79fd146da58915d4341885f0e3a6db14;p=ardislu.dev Adjust whitespace so the output is human-readable --- diff --git a/functions/atom.xml.js b/functions/atom.xml.js index bd6cc58..266b089 100644 --- a/functions/atom.xml.js +++ b/functions/atom.xml.js @@ -10,32 +10,32 @@ export async function onRequestGet({ env }) { .then(googleSheet => { for (const article of googleSheet.values) { entries.push(` - urn:google.com:${article[2]} - ${article[0]} - ${article[1]} - - ${new Date(article[5]).toISOString()} - ${new Date(article[6]).toISOString()} - `); + urn:google.com:${article[2]} + ${article[0]} + ${article[1]} + + ${new Date(article[5]).toISOString()} + ${new Date(article[6]).toISOString()} + `); updatedDates.push(new Date(article[6])); } }); const feed = ` - - - https://ardislu.dev/ - ardislu.dev - Notes on web development, crypto, self-hosting, and tech in general. - - Ardis Lu - - - ${new Date(Math.max(...updatedDates)).toISOString()} + - ${entries.join('')} + https://ardislu.dev/ + ardislu.dev + Notes on web development, crypto, self-hosting, and tech in general. + + Ardis Lu + + + ${new Date(Math.max(...updatedDates)).toISOString()} - ` + ${entries.join('\n ')} + +` return new Response(feed, { headers: { 'Content-Type': 'application/atom+xml' } }); } \ No newline at end of file