How to make a fully static site with app router?
Unanswered
Violet-green Swallow posted this in #help-forum
Violet-green SwallowOP
Hi all, I'm looking to create a completely static website (no auth, no backend, just a presentational website) using Next.JS. To my understanding, this was previously done with SSG and getStaticProps in pages router. How do I do this in app router?
This is going to be my first Next.js project, although not my first react project, so I apologize if this question might have been answered before.
This is going to be my first Next.js project, although not my first react project, so I apologize if this question might have been answered before.
3 Replies
@Violet-green Swallow its done automatically now
if you dont need anything in the url or anything dynamic, app dir understands the page is static, and will build it as a static page
to do the SSG stuff, use this
https://nextjs.org/docs/app/api-reference/functions/generate-static-params
https://nextjs.org/docs/app/api-reference/functions/generate-static-params