summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorSDGSDG <karmadharma@server.fake>2013-09-15 22:43:24 -0700
committerSDGSDG <karmadharma@server.fake>2013-09-15 23:13:17 -0700
commit3580233b385f05d7eaee258ed9cff451d528ead9 (patch)
tree91d631d231e2322f1dceaf76f6f5a04d4a04f8cb /samples
parent85213f077bc771024cf29677f79ffcc417088b18 (diff)
downloadpelican-3580233b385f05d7eaee258ed9cff451d528ead9.tar.gz
Support for pygment defaults and relevant documentation
Diffstat (limited to 'samples')
-rw-r--r--samples/content/unbelievable.rst29
-rwxr-xr-xsamples/pelican.conf.py3
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"