Our great sponsors
-
contentlayer
Contentlayer turns your content into data - making it super easy to import MD(X) and CMS content in your app
-
SurveyJS
Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App. With SurveyJS form UI libraries, you can build and style forms in a fully-integrated drag & drop form builder, render them in your JS app, and store form submission data in any backend, inc. PHP, ASP.NET Core, and Node.js.
A good blog needs an RSS feed, even if hardly anyone seems to use an RSS reader anymore. This article will explain how to create a RSS feed for a static blog. In this example we will use contentlayer, but it should work with other data sources too.
After that we use the feed library to create the feed and to convert our posts into RSS items. First we have to install the library and install date-fns as well. We need date-fns later to simplify working with dates.