-
Notifications
You must be signed in to change notification settings - Fork 10.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Best way to create dynamic pages from third party content (Medium) #4334
Comments
If you want data to be part of the "static" build then you have to rebuild every time there's a change. If you fetch the data in the client, then you don't have to rebuild since the data is fetched every time a user visits your page. The first option means data will load much faster but you have to rebuild. The second option means you don't have to rebuild but it means every time someone visits, the design will jump as the medium posts will take a while to show up. There's a source plugin for Medium https://www.gatsbyjs.org/packages/gatsby-source-medium/ |
Thank you for the reply, this helped me stop looking in the wrong direction for too long. I guess ideally I want something like a web hook, but to keep it simple for now I am loading the posts from medium every time the page loads. For anyone also looking to do this, here is code for a simple react component doing this using the
|
@Kaisaurus @KyleAMathews Sorry to disturbing you! I am just have the same problem these days. I am a newbie in gatsby and react. I am not sure about what I say. |
Description
I want a website to show medium blog posts and have individual pages for each post.
Is this possible with Gatsby without having to do a re-build every time there is a new post?
If its possible, what would be the approach to this? (I am a bit of a gatsby noob so a detail to the approach would be greatly appreciated)
Environment
Gatsby version: 1.9.213
Node.js version: 8.9.4
At the moment I am getting all medium post with this code:
and calling the function like this
The text was updated successfully, but these errors were encountered: