You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Internally they maintains a singleton highlighter instance and load the theme/language on demand. Different from `shiki.codeToHtml`, the `codeToHtml` shorthand function returns a Promise and `lang` and `theme` options are required.
56
63
57
64
### Fine-grained Bundle
@@ -156,6 +163,82 @@ export default {
156
163
}
157
164
```
158
165
166
+
## Additional Features
167
+
168
+
### Light/Dark Dual Themes
169
+
170
+
`shikiji` added an experimental light/dark dual themes support. Different from [markdown-it-shiki](https://github.com/antfu/markdown-it-shiki#dark-mode)'s approach which renders the code twice, `shikiji`'s dual themes approach uses CSS variables to store the colors on each token. It's more performant with a smaller bundle size.
171
+
172
+
Use `codeToHtmlDualThemes` to render the code with dual themes:
0 commit comments