Closed clickworkorange closed 10 months ago
You need to generate the CSS yourself using the helper methods of Rouge and incorporate that into your HTML page, see e.g. https://github.com/rouge-ruby/rouge#library.
See https://github.com/gettalong/hexapdf-website/blob/master/src/assets/css/site.css#L360 for an example of how I did this with the HexaPDF website which also uses kramdown and rouge via the static website generator webgen.
Aha! So it was something simple :) Thank you, I've now got the monokai
CSS working, with the addition of
pre pre {
float: left;
}
I think I've got kramdown+rouge mostly working in my Rails 7 app; for example
results in the following HTML output:
But no CSS is being applied, and the output renders like this:
At first I thought I was simply missing the stylesheet, but looking in the Rouge code I see the themes are actually
.rb
files, which I assume need to be executed by the syntax highlighter to generate the CSS. Something is missing, and I'm sure it's something simple, but I've spent a good while searching for an answer and haven't been able to find anything relevant. Help appreciated!My Gemfile has: