Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
8 posts
|
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 |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
Mayrycy, Your Jekyll configuration is correct. However, despite that fact that you have installed the pygments.rb gem on your system (gem list), that gem is not visible to Jekyll (bundle list). You need to follow the instructions on this page to get that set up correctly: https://jekyllrb.com/docs/ruby-101/#gemfile Here's a project you can use as a reference: (Only, instead of the coderay gem, you'll use pygments.rb. You should also use the latest version of jekyll-asciidoc, which is 3.0.0.beta.2). Best, -Dan On Sun, Jul 21, 2019 at 12:09 AM mszmurlo [via Asciidoctor :: Discussion] <[hidden email]> wrote: Hi, ... [show rest of quote] -- Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
8 posts
|
Thanks for the info, Dan. Works fine.
Any idea why callouts are rendered basically and not with fonts ? Thanks again for your time Maurycy |
Loading... |
Reply to author |
Edit post |
Move post |
Delete this post |
Delete this post and replies |
Change post date |
Print post |
Permalink |
Raw mail |
Administrator
2681 posts
|
The Jekyll AsciiDoc plugin does not provide a stylesheet by default. It's something you need to in. That's what these sections in the README mean: * https://github.com/asciidoctor/jekyll-asciidoc#setup I suppose that second section deserves a mention of the callout icons (which aren't really icons, just decorated numbers). I'll make a note of it. The quickest way to get your styles set up is to grab the styles that are provided
by the example project I linked to (which is the point of the example
project). Best, -Dan On Sun, Jul 21, 2019 at 2:41 AM mszmurlo [via Asciidoctor :: Discussion] <[hidden email]> wrote: Thanks for the info, Dan. Works fine. -- Dan Allen | @mojavelinux | https://twitter.com/mojavelinux |
Free forum by Nabble | Edit this page |