Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit cc6b03a

Browse files
committedDec 11, 2018
Fix #3188
1 parent 884390c commit cc6b03a

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed
 

‎CHANGES.txt

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ Bugfixes
99
* Remove mention of Twitter cards requiring an opt-in.
1010
This is not true anymore - anyone can use them.
1111

12+
Features
13+
--------
14+
15+
* Support for docutils.conf (Issue #3188)
16+
1217
New in v8.0.1
1318
=============
1419

‎docs/manual.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -2837,7 +2837,7 @@ with a ``True`` argument, eg. ``all=True``.
28372837
ReStructured Text is "compiled" by docutils, which supports a number of
28382838
configuration options. It would be difficult to integrate them all into
28392839
Nikola's configuration, so you can just put a ``docutils.conf`` next
2840-
to your ``conf.py`` and it will be used.
2840+
to your ``conf.py`` and any settings in its ``[nikola]`` section will be used.
28412841

28422842
More information in the `docutils configuration reference <http://docutils.sourceforge.net/docs/user/config.html>`__
28432843

‎nikola/plugins/compile/rest/__init__.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,8 @@ def observer(msg):
230230
class NikolaReader(docutils.readers.standalone.Reader):
231231
"""Nikola-specific docutils reader."""
232232

233+
config_section = 'nikola'
234+
233235
def __init__(self, *args, **kwargs):
234236
"""Initialize the reader."""
235237
self.transforms = kwargs.pop('transforms', [])
@@ -303,7 +305,7 @@ def rst2html(source, source_path=None, source_class=docutils.io.StringInput,
303305
destination_path=None, reader=None,
304306
parser=None, parser_name='restructuredtext', writer=None,
305307
writer_name='html', settings=None, settings_spec=None,
306-
settings_overrides=None, config_section=None,
308+
settings_overrides=None, config_section='nikola',
307309
enable_exit_status=None, logger=None, l_add_ln=0, transforms=None):
308310
"""Set up & run a ``Publisher``, and return a dictionary of document parts.
309311

0 commit comments

Comments
 (0)
Please sign in to comment.