Two methods for generating JSON pages with Next.js. One that updates on every request, the other on every build.
How to find the previous page a user visited before landing on the current page.