-
Notifications
You must be signed in to change notification settings - Fork 96
Use CodeRay highlighter in the documentation #1874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks! |
@gavinking when the docs are opened main CSS for this highlighter is loaded as it comes from the cdn (https://cdnjs.cloudflare.com/ajax/libs/prettify/r298/prettify.min.css) which is allowed. That's why the code is still highlighted.
😃 hmm, if the theme in other projects isn't nice, then maybe we should look at switching to highlight.js and pick one of their themes. https://highlightjs.org/examples |
Yes but that's just because that file has been moved to GitHub, and anyway the error doesn't actually seem to break anything AFAICT.
Well, devil is in the details of which one. There's plenty of nice dark-themed color schemes available there, but not so many decent options for white bg. |
It doesn't look good to have CSP errors on the page, I think we should find a workaround or change the highlighter. Rouge seems the best one in recognizing the code. I don't think it would be too hard to add a custom CSS so that the result look more similar to prettify. Maybe I can change some of the colours to look more like the style from prettify. |
@DavideD that would be great. And if you can get it looking good, we can come back and apply that consistently across all our docs. |
I'm closing this PR and I will send a new one soon |
Hey @DavideD ,
I was looking into something for Search and noticed that opening reactive docs show some errors and tries to load CSS that is not there anymore ...
https://hibernate.org/reactive/documentation/2.2/reference/html_single/
From what I see https://docs.asciidoctor.org/asciidoc/latest/verbatim/source-highlighter/
prettify
is not on the list of highlighters anymore (if it was).I've tried
highlight.js
, but it also wants to load additional CSS, whileCodeRay
generates a CSS file as part of the output.