diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/build/index.mjs | 12 |
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) +); |