Can pages that are role restricted for reading be statically generated?

System Information
  • Strapi Version: Latest
  • Operating System: Windows 10
  • Database: Mongo
  • Node Version: 14
  • NPM Version: whatever came with 14
  • Yarn Version: N/A

I’ve been playing around with Strapi and came across a use-case where I’d want to statically generate the site using Next.JS, but much of the site content should be locked behind authentication.

How does the SSG query that content without login to pre-build the pages?
How do I then restrict access to the content once it’s statically generated?

Any advice is welcome.

Anyone?

I can’t believe no one has had the same questions before.