gatsby-source-github-api icon indicating copy to clipboard operation
gatsby-source-github-api copied to clipboard

Using this with markdown remark

Open cctoni opened this issue 7 years ago • 7 comments

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

cctoni avatar Mar 06 '18 09:03 cctoni

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.

ldd avatar Mar 16 '18 01:03 ldd

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.

ldd avatar Aug 28 '19 01:08 ldd

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

svetlanapuro avatar May 16 '20 05:05 svetlanapuro

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.

ldd avatar May 16 '20 15:05 ldd

Hi there, Do you have any update on this?

svetlanapuro avatar Jun 09 '20 18:06 svetlanapuro

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.

:(

ldd avatar Jun 14 '20 02:06 ldd