The programatic options above will work with the code we're going to outline in a moment. The main difference is that if you stick to using vanilla Next.js then you can run this as a separate page (e.g.
rss.js
) and use the
getServerSideProps()
function to push the feed as XML content to the response object.
We won't have that option, so we'll incorporate a separate Node command as part of our build process.