Skip to content
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

Add support for rouge code highlighter #221

Open
jljouannic opened this issue Aug 31, 2019 · 2 comments · May be fixed by #226
Open

Add support for rouge code highlighter #221

jljouannic opened this issue Aug 31, 2019 · 2 comments · May be fixed by #226

Comments

@jljouannic
Copy link

Jekyll has dropped support for Pygments in the recent 4.0 release.

The jekyll-asciidoc plugin still relies on Pygments for code styling.

As an asciidoctor-rouge gem already exists, I wonder how difficult it would be to add support for it in the plugin, so that Pygment would not be needed anymore.

@mojavelinux
Copy link
Member

The jekyll-asciidoc plugin doesn't rely on Pygments for code styling. It just happens to generate the stylesheet for Pygments and copy it to the output. The same could be done for Rouge.

You can certainly use Rouge with jekyll-asciidoc today. First, set source-highlighter to rouge. Then, either set rouge-css to style or put the stylesheet in generated site yourself.

All the plugin would do is generate a copy the stylesheet for you. And we could certainly add that. You can find the logic in this file: https://github.com/asciidoctor/jekyll-asciidoc/blob/master/lib/jekyll-asciidoc/integrator.rb

@mojavelinux
Copy link
Member

As an asciidoctor-rouge gem already exists

Do not use that. Asciidoctor has support for Rouge out of the box starting in 2.0.

manuelprinz added a commit to manuelprinz/jekyll-asciidoc that referenced this issue Feb 12, 2020
Refactors code to be more generic, following the same model/prefixes as with pygments.
It also calls the Asciidoctor syntax highlighter factory directly, as there are no
helper methods for rouge in the Stylesheets class in Asciidoctor.

Closes: asciidoctor#221
@manuelprinz manuelprinz linked a pull request Feb 12, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants