diff options
| author | SDGSDG <karmadharma@server.fake> | 2013-09-15 22:43:24 -0700 |
|---|---|---|
| committer | SDGSDG <karmadharma@server.fake> | 2013-09-15 23:13:17 -0700 |
| commit | 3580233b385f05d7eaee258ed9cff451d528ead9 (patch) | |
| tree | 91d631d231e2322f1dceaf76f6f5a04d4a04f8cb /samples | |
| parent | 85213f077bc771024cf29677f79ffcc417088b18 (diff) | |
| download | pelican-3580233b385f05d7eaee258ed9cff451d528ead9.tar.gz | |
Support for pygment defaults and relevant documentation
Diffstat (limited to 'samples')
| -rw-r--r-- | samples/content/unbelievable.rst | 29 | ||||
| -rwxr-xr-x | samples/pelican.conf.py | 3 |
2 files changed, 30 insertions, 2 deletions
diff --git a/samples/content/unbelievable.rst b/samples/content/unbelievable.rst index b990d20c..209e3557 100644 --- a/samples/content/unbelievable.rst +++ b/samples/content/unbelievable.rst @@ -12,9 +12,20 @@ Testing sourcecode directive ---------------------------- .. sourcecode:: python - :linenos: + :linenos: - formatter = self.options and VARIANTS[self.options.keys()[0]] + formatter = self.options and VARIANTS[self.options.keys()[0]] + + +Testing another case +-------------------- + +This will now have a line number in 'custom' since it's the default in +pelican.conf, it will have nothing in default. + +.. sourcecode:: python + + formatter = self.options and VARIANTS[self.options.keys()[0]] Lovely. @@ -71,3 +82,17 @@ Testing even more sourcecode directives Lovely. + +Testing overriding config defaults +---------------------------------- + +Even if the default is line numbers, we can override it here + +.. sourcecode:: python + :linenos: none + + + formatter = self.options and VARIANTS[self.options.keys()[0]] + + +Lovely. diff --git a/samples/pelican.conf.py b/samples/pelican.conf.py index 4d5cd06d..d6a87923 100755 --- a/samples/pelican.conf.py +++ b/samples/pelican.conf.py @@ -48,6 +48,9 @@ STATIC_PATHS = [ # custom page generated with a jinja2 template TEMPLATE_PAGES = {'pages/jinja2_template.html': 'jinja2_template.html'} +# code blocks with line numbers +PYGMENTS_RST_OPTIONS = {'linenos': 'table'} + # foobar will not be used, because it's not in caps. All configuration keys # have to be in caps foobar = "barbaz" |
