Skip to content

Commit

Permalink
Fix #1904 -- compiler meta as good as 2-file
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jul 22, 2015
1 parent 81fad1c commit 7031c54
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Expand Up @@ -7,6 +7,7 @@ Features
Bugfixes
--------

* Don’t get metadata from file if compiler-specific metadata exist (Issue #1904)
* Fix PRETTY_URLS prompt for Windows (Issue #1901)
* Fix reST and Markdown title extraction from documents (Issue #1895, #1898)
* Minor improvements in the extending document.
Expand Down
3 changes: 2 additions & 1 deletion nikola/post.py
Expand Up @@ -980,8 +980,9 @@ def get_meta(post, file_metadata_regexp=None, unslugify_titles=False, lang=None)
compiler_meta = post.compiler.read_metadata(post, file_metadata_regexp, unslugify_titles, lang)
meta.update(compiler_meta)

if not post.is_two_file:
if not post.is_two_file and not compiler_meta:
# Meta file has precedence over file, which can contain garbage.
# Moreover, we should not to talk to the file if we have compiler meta.
meta.update(get_metadata_from_file(post.source_path, config, lang))

if lang is None:
Expand Down

0 comments on commit 7031c54

Please sign in to comment.