mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Support for pygment defaults and relevant documentation
This commit is contained in:
parent
85213f077b
commit
3580233b38
21 changed files with 288 additions and 33 deletions
|
|
@ -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.
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue