Skip to content
Discussion options

You must be logged in to vote

My question then becomes, since this is meant to replace the createPages API, how can I still generate pages (profiles) during builds and have a fallback component that will catch any slugs that have not yet had a static HTML page generated from a build

As the doc states quite early it expects you to have your data in our GraphQL data layer. Creating nodes with your data you get from your API is fairly easy with sourceNodes: https://www.gatsbyjs.com/docs/creating-a-source-plugin/

I'm hoping this can replace the current approach we have to use which requires doing a path check inside the 404 page component and serving content if a profile does in fact exist.

As mentioned in the previou…

Replies: 5 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by mcclaskiem
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@LekoArts
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants