This commit is contained in:
takashi-uchida 2025-04-15 10:26:19 -04:00 committed by GitHub
commit 3225432f30
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -94,6 +94,7 @@ To add syntax highlighting for any of the other [Prism-supported languages](http
Each additional language has to be a valid Prism component name. For example, Prism would map the _language_ `cs` to `csharp`, but only `prism-csharp.js` exists as a _component_, so you need to use `additionalLanguages: ['csharp']`. You can look into `node_modules/prismjs/components` to find all components (languages) available.
:::
For example, if you want to add highlighting for the PowerShell language:
@ -113,6 +114,12 @@ export default {
After adding `additionalLanguages`, restart Docusaurus.
:::warning
When using Java or Scala, both must be included together in additionalLanguages
:::
If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages`:
```bash npm2yarn