Asciidoctor Highlight.js #102
Replies: 2 comments
-
If you use Asciidoctor (Ruby), then asciidoctor-rouge is the way to go -- it's the same as asciidoctor-highlight.js, but written in Ruby and using Rouge (great code highlighter written in Ruby) instead of Highlight.js. |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @jirutka ! But I have already created a custom syntax definition for the project, using HLJS, so I'm trying to stick to it. I had looked into Rouge and how to create new syntaxes, but it seems to introduce unneeded complications (the syntax at hand is quite simple, no need to use states stacking). |
Beta Was this translation helpful? Give feedback.
-
Asciidoctor Highlight.js
We should take a look at @jirutka's Asciidoctor Highlight.js extension for it allows to use HLJS at convert time and free the final document from the need of loading HLJS package — thus making the docs truely portable to any HTML based format, including CHM, ePub, Mobi/Kindle, etc.
This is an Asciidoctor.js extension, so it would require an alternative toolchain to the Ruby version, which might preclude using other Ruby-only extensions (not really sure of the implications). We might still rely on this for specific formats like CHM, etc.
Local tests and more digging are required, and this thread will be used to aggregate notes, links and discussions on evaluating the pros and cons of this alternative approach.
Beta Was this translation helpful? Give feedback.
All reactions