I have a small blog in next js with app based routing. For this project I want to prerender all my blogposts when building / making a static export (for SEO purposes).
In page based routing I would have used getStaticProps but with app based routing it is not available anymore. I am told the replacement is to just use fetch that is built in next. However that only makes sense if you have an API, and I fetch my posts from the file system. So what should I use in my case?
Other relevant post (not the top answer but the second top with 15 upvotes):
How to fetch data server-side in the latest Next.js? Tried getStaticProps but it’s not running and getting undefined
My github:
https://github.com/johanperjulius1/next-complete/tree/master/next-course/next-blog