Skip to content
Permalink
Browse files

Fix #1904 -- compiler meta as good as 2-file

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Jul 22, 2015
1 parent 81fad1c commit 7031c54479a92c894d961ce7b9f08faba6b95a0c
Showing with 3 additions and 1 deletion.
  1. +1 −0 CHANGES.txt
  2. +2 −1 nikola/post.py
@@ -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.
@@ -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:

0 comments on commit 7031c54

Please sign in to comment.
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.