From 9e8d24ce79fd146da58915d4341885f0e3a6db14 Mon Sep 17 00:00:00 2001 From: Ardis Lu Date: Wed, 20 Jul 2022 19:38:50 -0700 Subject: [PATCH] Adjust whitespace so the output is human-readable --- functions/atom.xml.js | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) 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 -- 2.47.3