code: async function createPages({ actions: { createPage } }) {
    if (includeDevPages) {
      createPage({
        path: '/dev/logos',
        component: require.resolve('./frontend/components/development/logo-page'),
      })
    }
  
    categories.forEach(category => {
      const { id } = category
      createPage({
        path: `/category/${id}`,
        component: require.resolve('./frontend/components/main'),
        // `context` provided here becomes `props.pageContext` on the page.
        context: { category },
      })
    })
  }
docs: Often in Gatsby context gets piped through GraphQL, but GraphQL adds unnecessary complexity here, so this uses the programmatic API. https://www.gatsbyjs.org/docs/using-gatsby-without-graphql/#the-approach-fetch-data-and-use-gatsbys-createpages-api