Integrated Dynamic Streaming-First Sitemap
Learn how LaunchFa.st helps you create a sitemap with the best practices with streaming.
// ...import { SitemapStream, streamToPromise } from 'sitemap'
export async function GET() { const hostname = 'https://www.launchfa.st' const smStream = new SitemapStream({ hostname }) const slugs = [/* static slugs */] try { slugs.forEach((url) => { smStream.write({ /* url config */ }) }) // ... smStream.end() const sitemap = await streamToPromise(smStream) return webResponse(sitemap, 200, { 'Content-Type': 'text/xml', }) } catch (e: any) { // handle errors }}LaunchFa.st comes with a sitemap.xml.ts Astro endpoint that creates a sitemap as a streaming response, making it available to crawlers such as Google as soon as they request the page. This was quickly done with the help of sitemap package on npm: https://npmjs.com/package/sitemap.
With Astro’s prerender configuration flag per page or endpoint, the sitemaps can also be pre-rendered and also later be statically re-generated using ISR.
Continue reading
Waffo Pancake Payments Now Available in LaunchFast Starter Kits
We're excited to announce that Waffo Pancake payments are now available in all LaunchFast starter kits. Accept one-time and subscription payments through a merchant of record with a few environment variables.
Creem Payments in LaunchFast Starter Kits: Merchant of Record Checkout for SaaS
Every LaunchFast starter kit ships with a Creem checkout and a verified webhook route. Sell one-time products and subscriptions through a merchant of record that handles sales tax and compliance.
Polar Payments in LaunchFast Starter Kits: A Merchant of Record with No Extra Dependencies
Every LaunchFast starter kit ships with a Polar checkout and a verified webhook route. Sell one-time products and subscriptions through a merchant of record that handles sales tax for you.