Jekyll and asciidoctor: pygments and callouts issues
Posted by mszmurlo on Jul 21, 2019; 6:09am
URL: https://discuss.asciidoctor.org/Jekyll-and-asciidoctor-pygments-and-callouts-issues-tp7006.html
Hi,
I've been using AsciiDoctor for some time now and it's really a great tool. I started to put all my writings together on a single site with jekyll but I have an issue with code highlighting with pygments and callouts.
* Standalone asciioctor with pygments works fine
* When the post is included in jekylls _posts directory, the file gets processed fine but there are two issues:
1. source code is not highlighted. While strating jekyll with bundle exec jekyll serve --verbose, I get the following error: asciidoctor: WARNING: optional gem 'pygments.rb' is not available (reason: cannot load 'pygments'). Functionality disabled. However when I list the gems, pugments is present:
maurycy@kali> gem list | grep py
pygments.rb (1.2.1)
rb-pygments (0.1.0)
I'm not sure hwo mandatory this is, but I also added the following configuration in _config.yaml without any success:
asciidoc: {}
asciidoctor:
attributes:
- source-highlighter=pygments
- pygments-css=style
I'm not bound to pygments. If any other highlighter is known to work better, please let me know
2. I have :icons: font in the .adoc file, and callouts get rendered fine with asciidoctor alone but really really poorly with jekyll.
Thanks in advance for any help
Mayrycy