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 885776d

Browse files
author
Roberto Alsina
committedJun 1, 2017
separate HIDE_REST_DOCINFO option
1 parent 921ae9f commit 885776d

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed
 

‎CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Features
66

77
* Support for reStructured text docinfo metadata with
88
USE_REST_DOCINFO_METADATA option, defaulting to False (Issue #1923)
9+
* New HIDE_REST_DOCINFO option, defaulting to False.
910
* Support for Markdown Meta extension for Pelican
1011
compatibility (Issue #1923)
1112
* Support for YAML and TOML metadata (Issue #2801)

‎nikola/conf.py.in

+3
Original file line numberDiff line numberDiff line change
@@ -1138,6 +1138,9 @@ MARKDOWN_EXTENSIONS = ['markdown.extensions.fenced_code', 'markdown.extensions.c
11381138
# If enabled, extract metadata from docinfo fields in reSt documents
11391139
# USE_REST_DOCINFO_METADATA = False
11401140

1141+
# If enabled, hide docinfo fields in reSt document output
1142+
# HIDE_REST_DOCINFO = False
1143+
11411144
# If you hate "Filenames with Capital Letters and Spaces.md", you should
11421145
# set this to true.
11431146
UNSLUGIFY_TITLES = True

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def compile_string(self, data, source_path=None, is_two_file=True, post=None, la
116116

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

0 commit comments

Comments
 (0)
Please sign in to comment.