Skip to content
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

Embed .ipynb gist on gatsby-mdx page #15

Open
sammatuba opened this issue Jul 4, 2019 · 4 comments
Open

Embed .ipynb gist on gatsby-mdx page #15

sammatuba opened this issue Jul 4, 2019 · 4 comments

Comments

@sammatuba
Copy link

Hi. Thank you for the plugin.

I tried embedding .ipynb gists in a mdx page to no success. This is most probably a feature request..

@weirdpattern
Copy link
Owner

weirdpattern commented Jul 4, 2019

Hi @sammatuba take a look at #12 , does this help?

@sammatuba
Copy link
Author

sammatuba commented Jul 4, 2019

Hello @weirdpattern.
Yes, in fact I came across that issue as well and I followed your recommendation:
“Add "gatsby-remark-embed-gist/gatsby-ssr` to your list of plugins outside the gatsby-mdx configuration”

It worked beautifully for my gist .py file. However, .ipynb gist file (it’s in .json as raw) is not being rendered as expected. I suppose it’s because it has a specific structure and does not convert exactly to the same html structure you have in the plugin.

these are my gists for example:

this works perfectly with the plugin:
https://gist.github.com/sammatuba/70269c2b5268a83344f5de609ea9b3cc

but this doesn't:
https://gist.github.com/sammatuba/effedf57b8c2bf0d3249a221af420a89

@weirdpattern
Copy link
Owner

Ah I see, thanks for the detailed explanation... The plug-in parses the content of the gist as HTML and then does some post-processing to add the highlighting... I will have to look into to give you a better answer...

I'm going to try my best to get to this as soon as I can.

@weirdpattern
Copy link
Owner

I haven't had a chance to look at this... but I promise I will get to this soon...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants