Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Merge pull request #3072 from getnikola/fix-2956
Always including base post as dependency (#2956)
- Loading branch information
Showing
with
9 additions
and
8 deletions.
-
+2
−0
CHANGES.txt
-
+3
−3
nikola/plugins/misc/scan_posts.py
-
+4
−5
nikola/post.py
|
@@ -87,6 +87,8 @@ Features |
|
|
Bugfixes |
|
|
-------- |
|
|
|
|
|
* Fixes behavior for posts not available in default language |
|
|
(Issues #2956 and #3073) |
|
|
* Always follow ``FEED_LENGTH`` for Atom feeds |
|
|
* Apply filters to all Atom feeds |
|
|
* Read file metadata if compiler metadata exists and prefer it over |
|
|
|
@@ -83,11 +83,9 @@ def scan(self): |
|
|
if not any([x.startswith('.') |
|
|
for x in p.split(os.sep)])] |
|
|
|
|
|
for base_path in full_list: |
|
|
for base_path in sorted(full_list): |
|
|
if base_path in seen: |
|
|
continue |
|
|
else: |
|
|
seen.add(base_path) |
|
|
try: |
|
|
post = Post( |
|
|
base_path, |
|
@@ -100,6 +98,8 @@ def scan(self): |
|
|
destination_base=destination_translatable, |
|
|
metadata_extractors_by=self.site.metadata_extractors_by |
|
|
) |
|
|
for lang in post.translated_to: |
|
|
seen.add(post.translated_source_path(lang)) |
|
|
timeline.append(post) |
|
|
except Exception: |
|
|
LOGGER.error('Error reading post {}'.format(base_path)) |
|
|
|
@@ -587,11 +587,10 @@ def _get_dependencies(self, deps_list): |
|
|
def deps(self, lang): |
|
|
"""Return a list of file dependencies to build this post's page.""" |
|
|
deps = [] |
|
|
if self.default_lang in self.translated_to: |
|
|
deps.append(self.base_path) |
|
|
deps.append(self.source_path) |
|
|
if os.path.exists(self.metadata_path): |
|
|
deps.append(self.metadata_path) |
|
|
deps.append(self.base_path) |
|
|
deps.append(self.source_path) |
|
|
if os.path.exists(self.metadata_path): |
|
|
deps.append(self.metadata_path) |
|
|
if lang != self.default_lang: |
|
|
cand_1 = get_translation_candidate(self.config, self.source_path, lang) |
|
|
cand_2 = get_translation_candidate(self.config, self.base_path, lang) |
|
|