diff --git a/docs/api-doc-markdown.md b/docs/api-doc-markdown.md index 907b5c534c..932284c0c3 100644 --- a/docs/api-doc-markdown.md +++ b/docs/api-doc-markdown.md @@ -180,3 +180,31 @@ While Highlight.js provides support for [many popular languages out of the box]( } } ``` + +### Using Prism as additional syntax highlighter + +While highlight.js supports a lot of languages, you can opt to use Prism to syntax highlight certain languages available in the list [here](https://github.com/PrismJS/prism/tree/master/components). Include those languages in `usePrism` field in your [siteConfig.js](api-site-config.md) + +Example: +``` +// siteConfig.js +usePrism: ['jsx'] +``` + +Notice that the code block below uses JSX syntax highlighting from Prism. + +```jsx +class Example extends React.Component { + render() { + return ( + + Docusaurus +