mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-01 11:18:24 +02:00
Merge 1dcea7af8d
into 67924ca979
This commit is contained in:
commit
3225432f30
1 changed files with 7 additions and 0 deletions
|
@ -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.
|
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:
|
For example, if you want to add highlighting for the PowerShell language:
|
||||||
|
@ -113,6 +114,12 @@ export default {
|
||||||
|
|
||||||
After adding `additionalLanguages`, restart Docusaurus.
|
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`:
|
If you want to add highlighting for languages not yet supported by Prism, you can swizzle `prism-include-languages`:
|
||||||
|
|
||||||
```bash npm2yarn
|
```bash npm2yarn
|
||||||
|
|
Loading…
Add table
Reference in a new issue