Use shiki as code block highlighter instead of builtin highlight.js or prism.js.
Currently only works in hexo version >= 7.0.0
, which has a better highlight extend api.
Otherwise please use official plugin hexo-shiki-twoslash instead.
-
Install thiis package.
pnpm add hexo-highlight-shiki
-
Setup config
syntax_highlighter: "shiki"
-
Configure theme (default to
github-light
)shiki: theme: "github-light"
-
Configure renderer if using djot
shiki: renderer: "djot"