getpelican/pelican — pull request #740 by webdesignhero (2013-02-24 05:00:18+00:00)
Title: Allow explicit setting of markdown extensions

These additions are to make it easier to disable pygments or any other extension the user may not want. In the previous version, these plugins are hardcoded, but by making it a variable in the config, it is possible to not use pygments or easily load extra markdown plugins if needed; you can have multiple plugins in one virtual environment and have different configs load them as needed.

In my `pelicanconf.py` I then have the following:

MARKDOWNEXTENSIONS = ['extra', 'syntaxhighlighter']

where `syntaxhighlighter` is a custom markdown extension I am working on to use syntax highlighter instead of pygments for code highlighting. However, if its not set in the config file, it will fall back to the current settings there by default.

If someone knows better, is is possible to get the settings read in the MarkdownReader class instead, that might be more clean.