Use kramdown with pygments in Jekyll
I want to use kramdown (with features such as fenced code blocks, inline
attribute lists, header IDs) together with pygments for syntax
highlighting (e.g. for LaTeX support, which is not available with CodeRay
used by kramdown). Jekyll supports both kramdown and pygments, but
apparently not the two together (unless I use Liquid tags which I would
prefer not to).
I've also found some plugin snippets of how to make kramdown fenced code
blocks spit pygments highlighted code, but unfortunately I don't know how
to make that work.
I tried dumping all of the code from that site on some
_plugins/krampygs.rb file, but then jekyll build complains about:
Generating... error: undefined method `matches'
If I supply some trivial matches and output_ext as instructed by Jekyll
plugin docs, but then I don't know how to select this new converter for my
.md files. Adding something like
markdown: MarkdownConverter
on my _config.yml only complains that this is not a valid option.
So, well, I restate my question: How can I use kramdown with pygments in
Jekyll?
No comments:
Post a Comment