Docker syntax highlight not working shows nice Docker highlighting, but in my GitHub Pages blog with Jekyll & Minima, it’s appearing instead as plain text.


That definitely does not seem to be working with the markdown for docker. It might be worth opening an issue in the rouge repository. I was able to get some highlighting by changing the specified language, but that is far from ideal.

I did have some luck using the Jekyll tags instead of the backticks

 {% highlight docker %}

 {% end highlight %}

It’s not going to look pretty in your markdown file, but in your Jekyll theme it should be improved.

1 Like

Yeah, my Java highlighting in other posts is fine. I’ll try the Jekyll tags as well. I didn’t know if there was something about the Pages version of Rogue that is back-level or some setting I’m missing to enable the full set of languages…

To make this extra exciting, after I’d used the tags and they worked, I went back out of curiosity to compare the HTML output with each method in case it was notably different. I changed it back to the backticks, and now it is working with the backticks.

So. :woman_shrugging:

No difference with the Jekyll tags :frowning:

Hold… looks like there was a build failure, I think the {% endhighlight %} needs to have no spaces…

Nope, still build failure…

Ok, interesting. I normally use Prose for editing, and when trying to add the Jekyll tags with that, I got build failures. But when I went and added them in just GH editor, the build succeeded, and the highlighting worked.

So… wonder where to pursue/report the backticks not working…

(And regrettably, using the Jekyll syntax doesn’t correctly preview in the GH editor.)

FWIW, same behavior on Console highlighting as well, so it’s not limited to Docker :frowning:

Just checking - in case - have you tried using lowercase for bothconsole and docker?

I’m pretty sure I had tried that. I just switched back to that now, though, and didn’t lose the highlighting. Which I don’t know if it’s related to what you observed above, where once it worked with Jekyll tags, it still worked with backticks, or if I never actually tried lowercase.

It’s always a little unsatisfying when we don’t know why it works now, even though it works now, which is the important part. (It does look quite nice!)