From 9936538d8b60c5a2b5e2f3eece4525e70fbea55d Mon Sep 17 00:00:00 2001 From: Deniz Turgut Date: Tue, 2 Apr 2013 18:09:21 -0400 Subject: [PATCH] unify css class for pygments --- docs/faq.rst | 2 +- docs/settings.rst | 13 +++++++++---- pelican/readers.py | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/docs/faq.rst b/docs/faq.rst index 9429a44f..d083ee7d 100644 --- a/docs/faq.rst +++ b/docs/faq.rst @@ -44,7 +44,7 @@ I'm creating my own theme. How do I use Pygments for syntax highlighting? Pygments adds some classes to the generated content. These classes are used by themes to style code syntax highlighting via CSS. Specifically, you can -customize the appearance of your syntax highlighting via the ``.codehilite pre`` +customize the appearance of your syntax highlighting via the ``.highlight pre`` class in your theme's CSS file. To see how various styles can be used to render Django code, for example, you can use the demo `on the project website `_. diff --git a/docs/settings.rst b/docs/settings.rst index e6d4d324..db5c0164 100644 --- a/docs/settings.rst +++ b/docs/settings.rst @@ -84,10 +84,15 @@ Setting name (default value) What doe `IGNORE_FILES` (``[]``) A list of file globbing patterns to match against the source files to be ignored by the processor. For example ``['.#*']`` will ignore emacs temporary files. -`MD_EXTENSIONS` (``['codehilite','extra']``) A list of the extensions that the Markdown processor - will use. Refer to the extensions chapter in the - Python-Markdown documentation for a complete list of - supported extensions. +`MD_EXTENSIONS` (``['codehilite(css_class=highlight)','extra']``) A list of the extensions that the Markdown processor + will use. Refer to the Python Markdown documentation's + `Extensions section `_ + for a complete list of supported extensions. (Note that + defining this in your settings file will override and + replace the default values. If your goal is to *add* + to the default values for this setting, you'll need to + include them explicitly and enumerate the full list of + desired Markdown extensions.) `OUTPUT_PATH` (``'output/'``) Where to output the generated files. `PATH` (``None``) Path to content directory to be processed by Pelican. `PAGE_DIR` (``'pages'``) Directory to look at for pages, relative to `PATH`. diff --git a/pelican/readers.py b/pelican/readers.py index a6ff9118..ba4cd15a 100644 --- a/pelican/readers.py +++ b/pelican/readers.py @@ -147,7 +147,7 @@ class RstReader(Reader): class MarkdownReader(Reader): enabled = bool(Markdown) file_extensions = ['md', 'markdown', 'mkd'] - default_extensions = ['codehilite', 'extra'] + default_extensions = ['codehilite(css_class=highlight)', 'extra'] def __init__(self, *args, **kwargs): super(MarkdownReader, self).__init__(*args, **kwargs)