Skip to content

Commit 7031c54

Browse files
committedJul 22, 2015
Fix #1904 -- compiler meta as good as 2-file
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
1 parent 81fad1c commit 7031c54

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed
 

‎CHANGES.txt

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Features
77
Bugfixes
88
--------
99

10+
* Don’t get metadata from file if compiler-specific metadata exist (Issue #1904)
1011
* Fix PRETTY_URLS prompt for Windows (Issue #1901)
1112
* Fix reST and Markdown title extraction from documents (Issue #1895, #1898)
1213
* Minor improvements in the extending document.

‎nikola/post.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -980,8 +980,9 @@ def get_meta(post, file_metadata_regexp=None, unslugify_titles=False, lang=None)
980980
compiler_meta = post.compiler.read_metadata(post, file_metadata_regexp, unslugify_titles, lang)
981981
meta.update(compiler_meta)
982982

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

987988
if lang is None:

0 commit comments

Comments
 (0)
Please sign in to comment.