-
Notifications
You must be signed in to change notification settings - Fork 26
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
Embedding github gists? #19
Comments
So, the problem is that - Chronoblog uses plugin "gatsby-plugin-mdx", and does not use the plugin "gatsby-transformer-remark". The "gatsby-plugin-mdx" plugin itself can work with remark plugins, but they must be declared in "gatsby-plugin-mdx". That is, I could just add "gatsby-remark-embed-gist" directly to the theme. But of course, I don’t want to pull all possible “remark” plugins into the project. You can not declare "gatsby-plugin-mdx" in the starter - gatsby does not like it and it gives an error. So far I see only one solution - try to make an option in Chronoblog, something like However, maybe there is a more elegant solution? Some more standard way? I want to better explore this issue before adding new options. |
Thanks for the reply! I'm new to Gatsby in general, so unfortunately I don't think I can give you any pointers on how to tackle this, but what you proposed definitely sounds reasonable. I volunteer to test whatever you come up with, though! 😄 |
Where is exacly you advise to add option My module.exports = {
<...>
plugins: [
<...>
{
resolve: 'gatsby-plugin-mdx',
options: {
gatsbyRemarkPlugins: [
{
resolve: `gatsby-remark-table-of-contents`,
options: {
exclude: 'Table of Contents'
}
},
]
}
}
]
}; Can you help? |
This solution doesn't work for me either |
Sorry, I probably accidentally confused you 😓. This was a reflection on how, perhaps, it would be possible to implement this feature in the project (gatsby-theme-chronoblog), and not an instruction on what to do. |
I'm trying to embed a GitHub gist into a page, and I can't seem to get it to render. Tried using the
script
tag that it gives me and it's not working out (and theiframe
isn't exactly pretty, but it works). I tried using thegatsby-remark-embed-gist
plugin in gatsby and I managed to get all the errors to go away, but....it still doesn't render. Probably because it's not using remark for markdown parsing of the pages, right?Here's my
gatsby-config.js
file:Any help would be greatly appreciated! Thanks!
The text was updated successfully, but these errors were encountered: