Closed kito99 closed 5 months ago
You need to remove the blank line after the document title:
= Foo bar baz
:source-highlighter: highlight.js
:highlightjs-languages: java
Otherwise, :source-highlighter:
is not defined as a document attribute but as an attribute defined in the "body".
Thank you so much @ggrossetie! I totally missed that. I even compared it to prior presentations that worked and didn't see that detail!
It's a little counter-intuitive because many of the other revealjs-related attribute (I'd say, all of the others I've tried), work fine either way.
I'll make a PR for the docs.
Documentation updated in #531
I've been using asciidoctor-reveal.js on and off for several years, but for some reason, syntax highlighting doesn't work in a new presentation I created last year. This is using 5.0 and following the instructions here: https://docs.asciidoctor.org/reveal.js-converter/latest/setup/ruby-setup/. Initially I tried the Ruby install, but I also tried a new sample project with Ruby and plain Node, and either way. I also tried reverting to 4.1 and that didn't make a difference either. I get the same result: the HTML output has the right CSS classes, but
highlight.js
isn't loaded in the output. For reference, here is the sample presentation I'm using: