ASD
3 hours ago · Tech · 0 comments

How to add all kinds of feeds to your nextjs app router based app You’ve rediscovered the small web. You came across amazing RSS readers like FreshRSS Capy Reader. And suddenly you realized your NextJS based blog/website doesn’t have an RSS feed. So you start thinking. Should I add RSS or should it be Atom? Oh, I have heard about this jsonfeed format, perhaps that’s what I want. I’m here to tell you not to worry. Let’s add all kinds of feeds! What you need A nextjs app router based project. A source of feed items (like blog posts) Ability to add a dependency (it just has two extra dependencies): npm install feed You also need to decide what your feed URLs are going to be. For this post, I’m going to use the example of nivarana.org whose feeds are at: https://nivarana.org/feed/rss.xml https://nivarana.org/feed/atom.xml https://nivarana.org/feed/feed.json There’s no strong convention here, and feed discovery is done through “alternates” tag (which we will be implementing here) and so…

No comments yet. Log in to reply on the Fediverse. Comments will appear here.