© Joe Attardi 2020
J. AttardiUsing Gatsby and Netlify CMShttps://doi.org/10.1007/978-1-4842-6297-9_7

7. Dynamic Page Creation

Joe Attardi1 
(1)
Billerica, MA, USA
 

Our home page shows a listing of all the blog posts, which displays excerpts, but we still need a dedicated page for each post to show their full content. By hooking into Gatsby’s APIs, we can dynamically create pages based on the blog post data.

Gatsby Node APIs

First, create a new file in the root of the project called gatsby-node.js. This is a special file that is used to implement the Gatsby Node APIs. It allows you to manipulate and query the GraphQL data and create pages based on that data.

The various functions in this file are called at different times during the build process. Here ...

Get Using Gatsby and Netlify CMS: Build Blazing Fast JAMstack Apps Using Gatsby and Netlify CMS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.