we have been trying to build a very simple thing - a static site using nextjs with pagination. The content is coming from prismic.
However we have been struggling a LOT to get it done. Its very unclear on how to do this - how to generate page numbers, how to generate slugs, etc .
I think we are unable to figure out how to fit a CMS like prismic with a static site generator like nextjs.
We are obviously trying getstaticprops and getstaticpaths of Nextjs without success.
It would be great to get a simple example that does this. I have a messy codebase that doesnt work…but it would be so much nicer if we get an extremely simple example from you guys.
the only example that seems close (but we cant get it to work is https://github.com/gustavoguichard/vidanatural)
One thing i want to mention is that your own example on your site is now considered deprecated -
we should be using getstaticpaths and getstaticprops instead of getinitialprops.
there’s an example here - https://github.com/vercel/next.js/tree/canary/examples/cms-prismic - but no pagination which completely kills the whole purpose of using a CMS
P.S. it would so great if you could use Apollo Client way to do this - we have a pretty large codebase that we are planning to move to using nextjs and prismic and we already use apollo.