Functions

Function: generateProductRssFeed

product-rss-feed.generateProductRssFeed

generateProductRssFeed(rawProducts, options?): Promise<string>

generateProductRssFeed generates a RSS feed for your products. It can write the feed to a file if you specify a path. It will also validate your products against the productRssFeedItemSchema for any validation issues.



z.ZodError if there are any validation issues. You can find the issues by looking a the exceptions issues property to determine the exact issues. This only happens if `options.strict = true'.



Minimal example with a single product that writes to the public directory in Next.js.

TypeScript


Parameters

Name

Type

rawProducts

options?

Returns

Promise<string>

The RSS feed as a string.

Defined in