gatsby-source-github-api
gatsby-source-github-api copied to clipboard
Using this with markdown remark
Hey and at first thanks for this amazin plugin. What i want to achieve is to point gatsby to the repo and reading markdown files out of this and use with remark for generating the graphql schema. is there a way to do that ? Or maybe some pointings in the right direction
Sorry for the late reply. Busy with work. You understand. Did you manage to figure it out? If I understand correctly, the issue is that you do not want only one file, like I already mentioned in this issue
you need many markdown files. I am not entirely sure how to do that, and I also would love to know.
Closing this ticket mostly because we never found out how to do this.
However, anyone is free to open a new issue similar to this one, or to make further comments on this issue.
I have the same problem. I would like to be able to import multiple files from a GitHub repo as posts. Also I need them to be processed by allMdx, not allMarkdownRemark, as files are written in MDX
So now there are 2 people interested in that feature. I won't make any promises, but I'll take a look at it again.
It seems worth exploring.
Hi there, Do you have any update on this?
So, I went ahead and finally got to investigate this issue.
The gist of it is that this plugin , right now, only generates one Node. Ideally, we'd want something like this: https://github.com/gatsbyjs/gatsby/blob/master/packages/gatsby-source-hacker-news/src/gatsby-node.js
Once you have multiple Nodes, it is possible to mark some of them as having mediaType text/markdown and then Gatsby Transformers are able to transform them.
Sadly, I consider these changes to be non-trivial. And at the moment, I don't have the time to work on them.
But! PRs are welcome, and this issue will remain open. I guess you can also try to contact the author of gatsby-source-hacker-news or similar plugins to provide some guidance.
Finally, I am not saying that this is outside the scope of this project or that it cannot be fixed. In fact, this issue makes 100% sense. All that I am saying is that I cannot work on it right now.
:(