Skip to content

Commit

Permalink
Limit #3133 so that gallery-centric sites are possible
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Aug 8, 2018
1 parent 79dcd88 commit 1220595
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
16 changes: 14 additions & 2 deletions CHANGES.txt
@@ -1,11 +1,23 @@
New in v8.0.0b3 (changes since Beta 2)
======================================
New since Beta 3
================

.. to be merged into one "new in v8.0.0" entry later
Features
--------

* Don’t generate gallery index if the destination directory is
site root and it would conflict with blog index (Issue #3133)

Bugfixes
--------

New in v8.0.0b3 (changes since Beta 2)
======================================

Features
--------

* New data_file option for chart shortcode and directive (Issue #3129)
* Show the filename of the missing file when ``nikola serve`` can't
find a file (i.e. when an 404 error occurs).
Expand Down
6 changes: 5 additions & 1 deletion nikola/plugins/task/galleries.py
Expand Up @@ -92,6 +92,8 @@ def set_site(self, site):
'preserve_exif_data': site.config['PRESERVE_EXIF_DATA'],
'exif_whitelist': site.config['EXIF_WHITELIST'],
'preserve_icc_profiles': site.config['PRESERVE_ICC_PROFILES'],
'index_path': site.config['INDEX_PATH'],
'disable_indexes': site.config['DISABLE_INDEXES'],
}

# Verify that no folder in GALLERY_FOLDERS appears twice
Expand Down Expand Up @@ -370,7 +372,9 @@ def find_galleries(self):
# index will collide with the main page for the site.
# Don't generate the top-level gallery index in that
# case.
if output_folder or root != input_folder:
# FIXME: also ignore pages named index
if (output_folder or root != input_folder and
(not self.kw['disable_indexes'] and self.kw['index_path'] == '')):
self.gallery_list.append((root, input_folder, output_folder))

def create_galleries_paths(self):
Expand Down

0 comments on commit 1220595

Please sign in to comment.