Skip to content

Commit

Permalink
Fix PAGE_INDEX skipping generation when there exists a conflicting post
Browse files Browse the repository at this point in the history
  • Loading branch information
Kwpolska committed Apr 28, 2023
1 parent 4b60a2e commit df1310d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Features
Bug Fixes
---------

* Fix ``PAGE_INDEX`` skipping generation when there exists a conflicting post
* Fix RSS generation of galleries containing WebP images, which caused
an unhandled exception due to not having a known MIME type (Issue #3671)
* Fix ``auto`` command infinite loop (Issue #3677)
Expand Down
3 changes: 2 additions & 1 deletion nikola/plugins/task/page_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def should_generate_classification_page(self, dirname, post_list, lang):
short_destination = dirname + '/' + self.site.config['INDEX_FILE']
for post in post_list:
# If there is an index.html pending to be created from a page, do not generate the page index.
if post.destination_path(lang, sep='/') == short_destination:
other = post.destination_path(lang, sep='/')
if post.destination_path(lang, sep='/').lstrip('/') == short_destination.lstrip('/'):
return False
return True

0 comments on commit df1310d

Please sign in to comment.