-
Notifications
You must be signed in to change notification settings - Fork 9
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
Replace Rouge with highlight.js for code styling #67
Comments
Hey @sdarwin, we’re running into issues overwriting the library’s source highlighter to highlight.js from the boostlook side. I’ve been using MP11 to test. We tried setting the asciidoc source highlighter attribute at various levels through b2 (using site-config.jam as well as trying modifying its build.jam ). We also tried through asciidoctor extension (boostlook.rb). The only solution that worked was CLI command. But, ideally, we don’t authors to run b2 asciidoctor-attribute=source-highlighter=highlight.js manually. Any idea on how we could do this? Also, I know this isn’t ideal at all, but we thought we could leverage adding this attribute on the CI side cc @daveoconnor |
There are multiple ways a library's docs are built in general, for all libs. Consider the most common methods:
If by "asciidoc + boostlook" you definitely mean "antora + boostlook" , there is an antora-specific section of If a library author is using "asciidoc + boostlook" , but not "antora + boostlook", then they should modify their own doc/Jamfile or other local doc configuration files. Which are the exact libraries this applies to, "asciidoc + boostlook" ? |
Thanks for the insight on the building process.
Right, that was our initial thinking until it was decided to use highlight.js across all lib docs as well.
Not sure of others, but CharConv is definitely one. looping in @rbbeeston |
When a snapshot, or official release is built, that uses If you override the process somehow in However, individual libraries, built separately by an author, won't have the change. If an author is testing their docs locally... it will vary from what is on the website. "doc previews", are built separately/individually. They wouldn't include a modification from Up until now, these all methods corresponded, more or less. Well, not entirely. The top html header of the page is/was replaced by the website, on-the-fly. Ideally, the results of various scripts or methods of building any set of docs are consistent. Currently, the majority of libraries run b2. So the results are the same across multiple scripts, which is expected. |
Ultimately the goal is to have a consistent highlighting method on the website, irrespective of what the author uses locally, regardless of what method to build the docs is used. If we can implement it in b2 and that covers the majority of cases, I'm willing to call that a win, and hopefully authors would be willing to go that direction, or perhaps mostly be willing to agree to using highlight js as a standard, at least for the site documentation. |
This comment is somewhat hypothetical, but if library docs are overridden in |
Replace the current Rogue syntax highlighter with highlight.js.
Note:
This affects only libraries that use asciidoc + boostlook
The text was updated successfully, but these errors were encountered: