Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
lowercase METADATA_FORMAT value
  • Loading branch information
Roberto Alsina committed Jun 6, 2017
1 parent cf5dcc9 commit 8ba4937
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion nikola/nikola.py
Expand Up @@ -962,7 +962,7 @@ def __init__(self, **config):
self._GLOBAL_CONTEXT['transition'] = config.get('THEME_REVEAL_CONFIG_TRANSITION', 'cube')

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

Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/markdown/__init__.py
Expand Up @@ -137,7 +137,7 @@ def create_post(self, path, **kw):
content += '\n'
with io.open(path, "w+", encoding="utf8") as fd:
if onefile:
_format = self.site.config.get('METADATA_FORMAT', 'nikola')
_format = self.site.config.get('METADATA_FORMAT', 'nikola').lower()
if _format == 'pelican':
_format = 'pelican_md'
data = write_metadata(metadata, _format)
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/compile/rest/__init__.py
Expand Up @@ -177,7 +177,7 @@ def create_post(self, path, **kw):
content += '\n'
with io.open(path, "w+", encoding="utf8") as fd:
if onefile:
_format = self.site.config.get('METADATA_FORMAT', 'nikola')
_format = self.site.config.get('METADATA_FORMAT', 'nikola').lower()
if _format == 'pelican':
_format = 'pelican_rest'
fd.write(write_metadata(metadata, _format))
Expand Down

0 comments on commit 8ba4937

Please sign in to comment.