> On Nov 9, 2021, at 12:02 AM, Zoran Regvart <[email protected]> wrote: > > Hi David, > > On Tue, Nov 9, 2021 at 2:14 AM David Jencks <[email protected]> wrote: >> >> (prompted by seeing a recent highlight.js upgrade in the website) >> >> Someone pointed out shiki (https://shiki.matsu.io) on the Antora zulip >> recently and I wrote an Antora extension to set it up and use it as the >> (build time) syntax highlighter in Asciidoctor. >> >> The main point is that the syntax highlighting is grammar based, using the >> same parsers as VSCode. >> >> There isn’t all that much code to be highlighted in the docs, but I’ll make >> a demo to compare. Perhaps using it would be a good idea. >> >> My project is antora-shiki <https://gitlab.com/djencks/antora-shiki>. > > That looks interesting, I would like to trimm down on JavaScript usage > where appropriate. Though the Hugo bits also use highlight.js, so some > blog posts take advantage of this. I'd like to see a syntax > highlighter that doesn't use inline CSS also, does Shiki have this > option?
It looks like themes.md <https://github.com/shikijs/shiki/blob/main/docs/themes.md#theming-with-css-variables> css variables for color names is as far as it goes right now, but the docs seem to indicate that it’s pretty easy to write a new theme. I’m not sure we’d want to get into that, but perhaps contributing it to shiki would be an option. David Jencks
