deckgo / gatsby-remark-highlight-code

Adds stylish cards and syntax highlighting to code blocks in markdown files
MIT License
67 stars 18 forks source link

How do I override inlineCode? #49

Closed luchtech closed 2 years ago

luchtech commented 2 years ago

So I am using Material UI and would like to format the inlineCode to use a certain Material UI component.

First clue I got was to use MDXProvider for such. But there seems to be a conflict if I use this plugin and creating a custom code component. Maybe share some snippets on how to workaround this? Very new to using your plugin. It is really awesome but would to covert POST to <Chip label={"POST"} />.

peterpeterparker commented 2 years ago

Actually I never had to solve such question, therefore not sure spontaneously how to solve it and if I get it correctly. Can you provide a sample repo?

luchtech commented 2 years ago

https://mdxjs.com/guides/syntax-highlighting/#using-the-mdxprovider

Can you check this link?

peterpeterparker commented 2 years ago

I rather like first a sample repo which displays the issue.

luchtech commented 2 years ago

I don't know if it's an issue per se. I just want to understand where I should put my code so that I can customize language-text or inlineCode. Or maybe extend your code for on gatsby-config?

luchtech commented 2 years ago

Also, how can we use the Carbon UI for JSON data display on JSX? Can we use it out of MDX? Would like to create a Postman-like UI.

peterpeterparker commented 2 years ago

I don't know if it's an issue per se. I just want to understand where I should put my code so that I can customize language-text or inlineCode. Or maybe extend your code for on gatsby-config?

Honestly no idea, I never tried to use this Gatsby plugin with MDX. Therefore I was asking for a sample repo to understand the issue.

Also, how can we use the Carbon UI for JSON data display on JSX? Can we use it out of MDX? Would like to create a Postman-like UI.

Not sure neither that I get this question. This plugin convert Markdown to JS code that use the highlight-code web component.

peterpeterparker commented 2 years ago

I close the issue since no activity. If someone can provide a sample repo, ping me to reopen it.