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
Shiki has better syntax highlight because it uses TextMate grammar instead of shady regexp. It uses the same engine as in VS Code.
Implementation
I guess the only thing to do on doscify side, is to add a config option that allows to generate a different highlighter class prefix. That way all JS syntax highlighter could nearly be supported.
Hi @noraj , As per the requirement that customizing the code block class, I think it is feasible for now.
You could register a customer renderer for code.
Shiki support would be a nice upgrade, but the integration should probably account for its async highlighter setup and theme loading. A good first version could expose Shiki as an optional plugin that preloads configured languages/themes, then falls back gracefully when a language is missing. That keeps the core lightweight while giving users a path to modern highlighting.
Activity
Koooooo-7 commentedon Jul 18, 2025
Hi @noraj , As per the requirement that customizing the code block class, I think it is feasible for now.
You could register a customer renderer for code.
Not quite sure whether Shiki support static css add-on styling for code hightlight, glad to see ur feedback on it!
AhmedAlaa4611 commentedon Oct 3, 2025
Hello @noraj
Yes, I think so. I'm new to Docsify, and I've created a new project to try it out, but it doesn't seem to highlight anything.
RedCMD commentedon Oct 3, 2025
@noraj TextMate grammars are regexp based?
hiSandog commentedon Jun 30, 2026
Shiki support would be a nice upgrade, but the integration should probably account for its async highlighter setup and theme loading. A good first version could expose Shiki as an optional plugin that preloads configured languages/themes, then falls back gracefully when a language is missing. That keeps the core lightweight while giving users a path to modern highlighting.
sy-records commentedon Jul 3, 2026
Here's a plugin https://github.com/simochee/docsify-shiki
I also created a plugin: https://github.com/sy-records/docsify-shiki