-
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
fix(gatsby-source-medium): fix data fecthing & add limitation to readme #17547
fix(gatsby-source-medium): fix data fecthing & add limitation to readme #17547
Conversation
This change fixes the build problem but sadly it doesn't return the same amount of posts as in the initial request. Is there any alternative to log in into Medium in order to avoid the 403? |
Thank you for taking a stab at this @sujinjoshi. I'm currently marking this as WIP as I like to get some more info on this #17335 (comment) |
Let's close this PR as long as not a definite solution is found in which direction the plugin should be headed: #17335 |
… and remove limit option from query
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM from a technical standpoint, @gatsbyjs/learning should look at the README change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it seems that the team of Medium is not going to fix this issue and in the current state of the plugin, it doesn't work at all ...
4865ed3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this additional information. Good to know the limitations. One minor grammar change but other than that looks good to me.
Co-Authored-By: LB <laurie@gatsbyjs.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sadly, this is the best we can do. Thanks a ton! 💯
Thanks for the dialogue on this everyone! Going to get this merged. |
I tested a medium account with 4 articles. Then I tried to use |
@Crayon-ShinChan Can you please open a bug with as much duplication information as possible? Thank you. |
TL;DR
Fixes the issue but limited to latest 10 posts.
Description
Fixes the issue with medium.com cloudflare ddos protection by modifying the URL from https://medium.com/${nameOfBlogHere}/latest?format=json&limit=100 to https://medium.com/${nameOfBlogHere}?format=json as suggested by @biernacki here #17335 (comment)
Limitation
This workaround would limit the number of articles returned to 10. Hence, the plugin can't be used to display all the contents from medium blog. But it would be helpful if you are displaying only last n number of blogs (where n <= 10), which is I believe how most gatsby themes using this plugin are designed.
Related Issues
Fixes #17335