This site shows an example of how to generate pages in Gatsby from a json file. In this site, the data for pages is contained in src/data.json
, and the template that renders the data is templates/page.jsx
.
To run the example, clone the repo, then:
npm install
make develop
The pages specified in data.json are now accessible at localhost:8000/page-1
, localhost:8000/page-2
.