Rémi Rousselet
Rémi Rousselet

Reputation: 276881

How to use Prism plugins with Docusaurus v2?

I would like to use diff-highlighting on my documentation – which requires installing a plugin

It is apparently not installed by default, but there is no documentation on how to add plugins (only languages, which doesn't work for plugins)

How can I install prisms plugins in Docusaurus v2?

Upvotes: 1

Views: 1321

Answers (2)

Sebastien Lorber
Sebastien Lorber

Reputation: 92112

It works out of the box

```
diff
+ hey
- ho
    
hello
```

enter image description here

Upvotes: 0

Webber
Webber

Reputation: 5484

The only supported way seems to be using swizzle on prism-include-languages, which is a pretty elegant solution.

This process is documented by Docusaurus.

Here is the relevant feature request.

Upvotes: 0

Related Questions