Hello,
My entire blog is written in Markdown - I was using Octopress, now I'm working on switching to Pelican as it's
The problem is that I want to customize the pygments options for all my code blocks without having to go through and convert every single post into RST format. Changing PYGMENTS_RST_OPTIONS in pelicanconf.py doesn't seem to affect anything, and the docs only mention how to do things like turn on line numbers, etc, for the RST format.
Is there any way to go about this without writing a new plugin?
Thanks so much!
Ok, I kind of sorted what I needed. Using:
MD_EXTENSIONS = ['fenced_code', 'codehilite(css_class=highlight, linenums=True)', 'extra']
in my pelicanconf.py file, I was able to enable line numbering and fenced code block in markdown files. It's not 100% what I wanted, but it's good enough for now. The MD_EXTENSIONS setting couldn't hurt to be documented in the Getting Started docs on syntax highlighting.
From the markdown python source:
codehilite options:
Using the fenced_code extension enables you to use GitHub-style code blocks:
``````
print 'Hello world!'
``````
Most helpful comment
Ok, I kind of sorted what I needed. Using:
in my pelicanconf.py file, I was able to enable line numbering and fenced code block in markdown files. It's not 100% what I wanted, but it's good enough for now. The MD_EXTENSIONS setting couldn't hurt to be documented in the Getting Started docs on syntax highlighting.
From the markdown python source:
codehilite options:
Set to 'auto' by default.
Using the fenced_code extension enables you to use GitHub-style code blocks:
``````
``````