Skip to content

Commit

Permalink
Fix #3167 — fix docinfo removal for sites that use reST docinfo
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Sep 18, 2018
1 parent f46ecdf commit bd86008
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
12 changes: 12 additions & 0 deletions CHANGES.txt
@@ -1,3 +1,15 @@
New in master
=============

Features
--------

Bugfixes
--------

* Fix docinfo removal for sites that use reST docinfo metadata
(Issue #3167)

New in v8.0.0
=============

Expand Down
4 changes: 2 additions & 2 deletions nikola/nikola.py
Expand Up @@ -842,12 +842,12 @@ def __init__(self, **config):
metadata_extractors.DEFAULT_EXTRACTOR_NAME))
sys.exit(1)

# The pelican metadata format requires a markdown extension
# The Pelican metadata format requires a markdown extension
if config.get('METADATA_FORMAT', 'nikola').lower() == 'pelican':
if 'markdown.extensions.meta' not in config.get('MARKDOWN_EXTENSIONS', []) \
and 'markdown' in self.config['COMPILERS']:
utils.LOGGER.warn(
'To use the pelican metadata format you need to add '
'To use the Pelican metadata format, you need to add '
'"markdown.extensions.meta" to your MARKDOWN_EXTENSIONS setting.')

# We use one global tzinfo object all over Nikola.
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/rest/__init__.py
Expand Up @@ -125,7 +125,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
'math_output': 'mathjax /assets/js/mathjax.js',
'template': default_template_path,
'language_code': LEGAL_VALUES['DOCUTILS_LOCALES'].get(LocaleBorg().current_lang, 'en'),
'doctitle_xform': not self.site.config.get('USE_REST_DOCINFO_METADATA'),
'doctitle_xform': self.site.config.get('USE_REST_DOCINFO_METADATA'),
}

from nikola import shortcodes as sc
Expand Down

0 comments on commit bd86008

Please sign in to comment.