Configuration
All Rehype diagram plugins support (at least) following configurations:
strategy
(optional). Defaultinline
darkScheme
(optional). Defaultundefined
cache
(optional) - Map-like storage to speed up consequent renders of page. You can use standard JSMap
, but probably it is better to use @beoe/cache.class
(optional) - allows to setup additional classes for diagrams. For example,.not-content
for inline diagrams if you use tailwindcss-typographysvgo
(optional) - options for SVGO. Usefalse
to disable optimization with SVGO
All configurations can be set either globally or locally (via fence-code meta). Global configurations applies to all diagrams. Local configurations applies only to one diagram. Local configurations always override global, with exception for class
option (it applies all provided classes).
Also you won’t be able to set cache
and svgo
via local configurations, except disabling them with false
value.
Global configuration
For example,