Dynamically Creating Pages

Now that you've got data being pulled into Gatsby's GraphQL database via one or more source plugins, the next step is to use that data to dynamically generate pages at build time. In our example we're consuming a set of Recipes from our Drupal site, and now we need to generate a static HTML page for each of the N recipes.

In this tutorial we'll:

  • Learn about using Gatsby's createPages() Node API for dynamically adding to the list of routes that Gatsby will build and statically render
  • Map the results of a GraphQL query against Gatsby's database to a React template in order to generate an HTML representation of the data
  • Learn about the concept of page queries in Gatsby

By the end of this tutorial you'll know how to create static pages at build time in a Gatsby application based on data sourced from Drupal -- or any other source that Gatsby supports.

Sign in with your Osio Labs account
to gain instant access to our entire library.

Add Material UICreating Lists of Content
Built with ️ by Osio Labs
Terms of use / Privacy policy / © 2021 Osio Labs, Inc.