re: Gatsby - Switching from Markdown to MDX VIEW POST


For the thing with code snippets, isn't it the same with normal markdown? For syntax highlighting you would need to add in some form of gatsby-remark plugins, Right?


Code blocks syntax highlighting works out of the box with normal markdown files. But yeah in order to implement the PrismJS plugin in gatsby-plugin-mdx I added the gatsby-remark-prismjs plugin to the gatsbyRemarkPlugins options node. You could create your own with prism-react-renderer too. I just went with the plugin to start to get over to MDX quicker.

Gatsby Plugin MDX Doc

MDX JS Syntax Highlighting Guide


oh! you meant inside the markdown files and not the website itself?

Code of Conduct Report abuse