-
Notifications
You must be signed in to change notification settings - Fork 2
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
Switch from Highlight to Rouge #130
Comments
I think that's good for integrity, we can go ahead accordingly. |
Thanks! BTW ... Please enable "Discussions" in the repository settings, so we can move all those Issues which are mere considerations (as opposed to practical TODO tasks) therein and keep Issues uncluttered. Also, Discussions is a very cool feature for it allows us to freely discuss any topic without feat of polluting an Issue or going off topic! |
A Few Considerations on SassI'm still not sure about dropping our custom Sass stylesheets, the reason being that the new ALAN syntax for Rouge covers many more syntax elements than Highlight did, but on the ALAN Docs repository we're hiding these new elements by colouring them alike, i.e. in order to mimic the old Highlight theme (it's Thomas desire to keep the colours down to a minimum). But I think that here we could experiment with some advanced themes which would benefit from the new elements (e.g. strings delimiters having their own colour, etc.). Definitely, we need to ensure that any documents from this project will build correctly if used on the ALAN Doc toolchain — i.e. any custom styles must be present in the stylesheets and template available there — but this doesn't mean that those style need to be implemented identically here, they just need to be compatible (after all, the whole idea in AsciiDoc is to separate formatting and styling concerns, allowing freedom of variations). But surely, in the initial stage after switching to Rouge I'll be using the Also, it's worth noting that currently Asciidoctor doesn't support span styles in Rouge (since Rouge is natively part of Asciidoctor, we can't do much except wait for the fix from upstream). Rouge LimitsCurrently Rouge can't handle highlight/marked and spans formatting — if these are found, the block is simply not highlighted. I don't think we're using these formatting styles in our code blocks, but we should check, and if we are we'll have to adopt and alternative solution. Rouge BenefitsWith Rouge we can finally use callouts in our documents! This will make any examples in the documentation easier to understand. We can even add callouts in the StdLib sources, in case of code snippets being reproduces in the StdLib Manual (or other docs), since these can be stripped from the final distribution package via the sanitation scripts, along with the region-tag comments (which we're already using to mark snippets that need to be Also, these comments could make the code more readable for us maintainers, since we'll be working on the un-sanitized library sources. Transcripts StylesWe'll need to add our extra custom transcript styles to the ALAN Docs Sass sources (if they aren't there already, which they might, I need to check). We're using SED to carry out some AsciiDoc transformation on the generated transcripts: player commands are rendered in bold, and comments are styled via These styles are on Example blocks with custom roles/classes. For more info see Toolchain Details. |
Ok Tristano, can you please advise about the exact path about enabling "discussions" in the settings, as I cannot find it right away. Thanks! |
It's in the main settings page, down below. It's just a checkbox with "Enable Discussions" — there's also a "Setup Discussions" button, but you can skip that since it just creates a default welcome page, which we don't really need. |
Tristano, let me know if I have managed to enable discussions or, if not, what is the exact procedure I need to take. Thanks! |
You have! Thanks. Now I'll begin converting to Discussions various Issues which are more conversations and thoughts exchanges than practical TODO stuff; so we'll have less cluttering here on Issues- Old links to Issues are preserved, for the Issues are copied to Discussion and given a new ID number, and the old one preserved with an auto-generated notice (or redirection, I don't remember) pointing to the new Discussion. |
Use Rouge for syntax highlighting instead of Highlight (fixes #130). Since Rouge is a Ruby gem, it offers better integration with Asciidoctor and is more powerful than Highlight thanks to its lexers being Ruby code. Drop the Sass sources folder `_assets_src/sass/` and use instead the prebuilt docinfo from the ALAN Docs project, now found in the new `_assets/rouge/` folder, along with other Rouge assets which can now be updated via a Bash script that downloads these assets from ALAN Docs using cURL. Eliminate other unneeded Highlight assets, and update all the build scripts and documentation accordingly.
Opted# Opted to Reuse Styles from ALAN Docs@AnssiR66, in the end I've decided to drop the Sass folder here, and instead add our custom styles to the Sass sources in ALAN Docs, so we can just import the pre-built Since the ALAN Docs repository is the main reference for all the Rouge related assets (the ALAN lexer, the I think that we should strive to centralize as many assets as possible in a single repository, and reuses them in all other repositories, so we can avoid duplicate work across projects. After all, the ALAN Docs project is the main documentation reference, so it's easier to add new styles we might need there, and then import them here. |
We should stop using Highlight and switch to Rouge instead, following the steps of the ALAN Docs and ALAN i18n repositories. Our custom ALAN syntax (lexer) for Rouge is production ready, so are the Sass stylesheets.
_assets/adoc/
:highlight-treeprocessor_mod.rb
.haml/
folder (no longer needed)._assets_src/sass/
:Substitute Highlight themes with Rouge themes.docinfo.html
from ALAN Docs!Generate/update_assets/adoc/docinfo.html
.docinfo.html
from ALAN Docs?References
The text was updated successfully, but these errors were encountered: