DEV Community

Discussion on: Generate Dynamic JSON Pages with Next.js

Collapse
 
sergeyre profile image
SergeyRe

you can use page props to serve as static json api
its available under the path ./_next/data/build_id/page_slug.json
its good case for custom build id
nextjs.org/docs/api-reference/next...
example for sure
todayandnow.ru/_next/data/my-build...
for this page
todayandnow.ru/chem-zanyat-detei-n...

Collapse
 
seancdavis profile image
Sean C Davis

That's a creative approach!