Skip to content
Discussion options

You must be logged in to vote

There are a few different ways:

  • Use a library like Highlight.js or Prism.js
  • Use MDX and MdxProvider to specify which React components you want to use to render the elements
  • Add global CSS styles targeting those elements inside pre or code (don't recommend)

Good example: https://github.com/tailwindlabs/blog.tailwindcss.com

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by leerob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
3 participants