Skip to content
Permalink
Browse files

Simplification.

  • Loading branch information
felixfontein committed Jul 1, 2017
1 parent b8729ea commit cf2abe6c609f7c0d1ed8348e9238ee4a89543f28
Showing with 2 additions and 5 deletions.
  1. +2 −5 nikola/post.py
@@ -991,12 +991,9 @@ def get_metadata_from_file(source_path, config=None, lang=None):
def _get_metadata_from_file(file_lines, config=None):
"""Extract metadata from a post's source file."""
meta, metadata_type = utils.extract_metadata(file_lines)
if metadata_type == 'yaml':
if metadata_type in ('toml', 'yaml'):
# Map metadata from other platforms to names Nikola expects (Issue #2817)
map_metadata(meta, 'yaml', config)
if metadata_type == 'toml':
# Map metadata from other platforms to names Nikola expects (Issue #2817)
map_metadata(meta, 'toml', config)
map_metadata(meta, metadata_type, config)
return meta


0 comments on commit cf2abe6

Please sign in to comment.