-
Add
pygments_global_config.rb
tomy-jekyll-project/_plugins/
. -
Add Pygments options to
_config.yml
markdown: redcarpet
pygments: true
pygments_options: ['lineanchors', 'linenos=table']
- Write highlight tags or fenced code blocks and have the
pygments_options
passed in automatically.
{% highlight ruby %}
puts "Hello, world!"
{% endhighlight %}
'''ruby
puts "Hello, world!"
'''
instead of
{% highlight ruby linenos=table lineanchors %}
puts "Hello, world!"
{% endhighlight %}
or the inability to pass Pygments options into the fenced code block.
Hey, I've been using your excellent plugin to add lineanchors to all of my codeblocks, but since upgrading Jekyll to version 2.2.0 I'm getting the following error:
Liquid Exception: undefined method
empty?' for false:FalseClass in _posts/`Any idea why this might be?
Here's the stack trace: https://gist.github.com/drewsberry/81c4df87237d040cfa4b