Skip to content
Permalink
Browse files
separate HIDE_REST_DOCINFO option
  • Loading branch information
ralsina committed Jun 1, 2017
1 parent 921ae9f commit 885776d790f3b47b6ff185abb772fbc0dddc163f
Showing with 5 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +3 −0 nikola/conf.py.in
  3. +1 −1 nikola/plugins/compile/rest/__init__.py
@@ -6,6 +6,7 @@ Features

* Support for reStructured text docinfo metadata with
USE_REST_DOCINFO_METADATA option, defaulting to False (Issue #1923)
* New HIDE_REST_DOCINFO option, defaulting to False.
* Support for Markdown Meta extension for Pelican
compatibility (Issue #1923)
* Support for YAML and TOML metadata (Issue #2801)
@@ -1138,6 +1138,9 @@ MARKDOWN_EXTENSIONS = ['markdown.extensions.fenced_code', 'markdown.extensions.c
# If enabled, extract metadata from docinfo fields in reSt documents
# USE_REST_DOCINFO_METADATA = False

# If enabled, hide docinfo fields in reSt document output
# HIDE_REST_DOCINFO = False

# If you hate "Filenames with Capital Letters and Spaces.md", you should
# set this to true.
UNSLUGIFY_TITLES = True
@@ -116,7 +116,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la

from nikola import shortcodes as sc
new_data, shortcodes = sc.extract_shortcodes(data)
if self.site.config.get('USE_REST_DOCINFO_METADATA'):
if self.site.config.get('HIDE_REST_DOCINFO', False):
self.site.rst_transforms.append(RemoveDocinfo)
output, error_level, deps, _ = rst2html(
new_data, settings_overrides=settings_overrides, logger=self.logger, source_path=source_path, l_add_ln=add_ln, transforms=self.site.rst_transforms,

0 comments on commit 885776d

Please sign in to comment.