The pages.json file

The pages.json file represents a list of Page objects that are generated from the Redux pages namespace, accounting for the componentChunkNamejsonNamepath, and matchPath for each respective Page object. These Page objects are ordered such that those pages having a matchPath precede those that lack one, in order to support the work of cache-dir/find-page.js in selecting pages based on regular expressions prior to attempting explicit paths.

Example output for a given Page object appears as follows:

{
  componentChunkName: "component---src-blog-2-js",
  jsonName: "blog-c06",
  path: "/blog",
},
// more pages

The pages.json file is created only when the gatsby develop command is executed; otherwise, during Gatsby builds, data.json is used and includes page information and other important data.


Posted

in

,

by

Tags:

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *