Gatsby’s createPage
action allows for additional data to be passed in via context
. In this lesson, we will add a processing step to include links between posts, and update our templates to conditionally display them as appropriate.
Hi, this doesn't quite seem to work for me, I have pretty much the same setup but when I have my most recent post the previous
and next
point to posts that are not in the same order as what is displayed on the main page.
I've tried looking at the query on ___grapgql
but it only returns one post, I'm struggling to debug what exactly is going on.
Hey Scott, same here. I'm running into the same issue :(
Take a look at gatsby-node.js Marcus
https://github.com/tayiorbeii/gatsby-demo-blog-code/issues/2
Thanks Scott!
LMK if that worked for you, worked for me. It did take me a while to figure it out.
Is there something special about pathContext
variable name? Just creating an object context is mapped to pathContext in all cases?