summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorache <ache@ache.one>2023-11-16 09:26:45 +0100
committerache <ache@ache.one>2023-11-16 09:26:45 +0100
commit093fdafe3ecded8ebc3ffb75bbd0860afdaf5bec (patch)
treeb6c3bdab02c534e36481880b442a763799b79457 /src
parentPush avif alternativ to png (diff)
Readabilty of sitemap generation
Diffstat (limited to 'src')
-rw-r--r--src/build/index.mjs12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/build/index.mjs b/src/build/index.mjs
index 63f2d6a..a2b10af 100644
--- a/src/build/index.mjs
+++ b/src/build/index.mjs
@@ -135,11 +135,15 @@ for (const lang in i18n) {
}
console.log(`Create: sitemap.xml`);
+
// Create a stream to write to
-const stream = new SitemapStream({hostname: 'https://ache.one'})
+const stream = new SitemapStream({hostname: 'https://ache.one'});
// Return a promise that resolves with your XML string
-streamToPromise(Readable.from(links).pipe(stream)).then((data) =>
- data.toString()
-).then(sitemapXML => fs.writeFileSync("sitemap.xml", sitemapXML));
+streamToPromise(
+ Readable.from(links)
+ .pipe(stream))
+ .then(data => data.toString())
+ .then(sitemapXML => fs.writeFileSync("sitemap.xml", sitemapXML)
+);