Skip to content

Commit

Permalink
Fix #3188
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Dec 11, 2018
1 parent 884390c commit cc6b03a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGES.txt
Expand Up @@ -9,6 +9,11 @@ Bugfixes
* Remove mention of Twitter cards requiring an opt-in.
This is not true anymore - anyone can use them.

Features
--------

* Support for docutils.conf (Issue #3188)

New in v8.0.1
=============

Expand Down
2 changes: 1 addition & 1 deletion docs/manual.rst
Expand Up @@ -2837,7 +2837,7 @@ with a ``True`` argument, eg. ``all=True``.
ReStructured Text is "compiled" by docutils, which supports a number of
configuration options. It would be difficult to integrate them all into
Nikola's configuration, so you can just put a ``docutils.conf`` next
to your ``conf.py`` and it will be used.
to your ``conf.py`` and any settings in its ``[nikola]`` section will be used.

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

Expand Down
4 changes: 3 additions & 1 deletion nikola/plugins/compile/rest/__init__.py
Expand Up @@ -230,6 +230,8 @@ def observer(msg):
class NikolaReader(docutils.readers.standalone.Reader):
"""Nikola-specific docutils reader."""

config_section = 'nikola'

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

0 comments on commit cc6b03a

Please sign in to comment.