-
Notifications
You must be signed in to change notification settings - Fork 604
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
Custom components in theme broken #284
Comments
Thanks, but I can't seem to reproduce the bug – can you list your dependencies with |
Thanks for trying to reproduce! I'll get a codesandbox together as well to see if I can reproduce there.
|
Currently mdx-deck isn't intended to be used with gatsby-mdx – there might be conflicting versions of an mdx loader or setup happening, since mdx-deck 2 uses MDX v1 and a custom plugin. Can you see if you can reproduce the error with a setup that doesn't include the other dependencies? |
Ah yeah that seems to be the issue. Thanks for looking in to it! https://codesandbox.io/s/883kqpw740 with gatsby |
I have a similar issue (similar to the title). I tried exporting a theme with a components object: {
components: {
code: MyComponent,
}
} Also tried using existing themes like: export { syntaxHighlighterPrism as theme } from 'mdx-deck/themes'
\```js
console.log("foo")
\``` but it is still using the default components. I didn't have time to debug it, is it a bug? |
@pomber is this happening with only MDX v1 alpha in your dependency tree? |
This is the package.json: {
"scripts": {
"start": "mdx-deck src/deck.mdx"
},
"dependencies": {
"mdx-deck": "^2.0.6"
}
} And the dependency tree: |
If I create the project with |
That is odd... 🤔 MDX v1 alpha does have some updates that I'm planning on bringing in this weekend – could be related to that |
@derekr heads up that there's now an experimental Gatsby theme package, if you're still looking into using MDX Deck with Gatsby, see https://github.com/jxnblk/mdx-deck/tree/master/packages/gatsby-theme |
Closing this since the original issue appears to have been resolved |
Seems like the
components
field in custom themes isn't respected (perhaps being merged with default/base theme incorrectly? Trying to follow the syntax highlighting docs and am using latest mdx-deck.Following: https://github.com/jxnblk/mdx-deck/blob/master/docs/theming.md#syntax-highlighting
The text was updated successfully, but these errors were encountered: