Gatsby: Programmatic blog pages without using markdown?

Created on 17 May 2018  路  4Comments  路  Source: gatsbyjs/gatsby

Hey Gatsby team,

I'm trying to couple Gatsby with Graph CMS, so I'll be getting back a JSON object containing all my blog content. In pure React, I would make a variable route and query the JSON object with the slug that the user has hit.

I haven't been able to find much documentation on building a programmatic blog without using markdown.

Is it possible? And if so, could you link me to any documentation you may have?

Thank you!!

question or discussion

All 4 comments

Hey there's a plugin for Graph CMS that will allow you to grab your data and access it through GraphQL. https://github.com/GraphCMS/gatsby-source-graphcms/blob/master/README.md

Graphcms actuallly released a source code of a gatsby starter that uses graph cms https://github.com/GraphCMS/graphcms-examples/tree/master/gatsby-source-plugin-blog

If you look at the gatsby-node.js, you can see that everytime gatsby creates a page, a path is automatically created depending on that posts slug value. I think that last link i sent is the answer you're looking for.

Thanks @daydream05! @brohlson this sounds like it's solved? Closing this issue but please re-open or create a new issue if that's not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ferMartz picture ferMartz  路  3Comments

jimfilippou picture jimfilippou  路  3Comments

hobochild picture hobochild  路  3Comments

signalwerk picture signalwerk  路  3Comments

dustinhorton picture dustinhorton  路  3Comments