diff --git a/sigal/gallery.py b/sigal/gallery.py index b0efc39..7cb40bd 100644 --- a/sigal/gallery.py +++ b/sigal/gallery.py @@ -223,13 +223,13 @@ class Album(UnicodeMixin): """ description_file = "index.md" - output_file = 'index.html' - def __init__(self, path, settings, dirnames, filenames, gallery): + def __init__(self, path, settings, dirnames, filenames, gallery, output_file='index.html'): self.path = path self.name = path.split(os.path.sep)[-1] self.gallery = gallery self.settings = settings + self.output_file = output_file self._thumbnail = None if path == '.': @@ -480,6 +480,8 @@ class Gallery(object): ignore_dirs = settings['ignore_directories'] ignore_files = settings['ignore_files'] + output_filename = settings['output_filename'] + progressChars = cycle(["/", "-", "\\", "|"]) if self.logger.getEffectiveLevel() >= logging.WARNING: self.progressbar_target = None @@ -516,7 +518,7 @@ class Gallery(object): if path not in albums.keys(): dirs.remove(d) - album = Album(relpath, settings, dirs, files, self) + album = Album(relpath, settings, dirs, files, self, output_filename) if not album.medias and not album.albums: self.logger.info('Skip empty album: %r', album) diff --git a/sigal/settings.py b/sigal/settings.py index 6599fe4..bef3a1d 100644 --- a/sigal/settings.py +++ b/sigal/settings.py @@ -50,6 +50,7 @@ _DEFAULT_CONFIG = { 'medias_sort_attr': 'filename', 'medias_sort_reverse': False, 'make_thumbs': True, + 'output_filename': 'index.html', 'orig_dir': 'original', 'orig_link': False, 'plugins': [], diff --git a/sigal/templates/sigal.conf.py b/sigal/templates/sigal.conf.py index 0d27dff..6dc6f42 100644 --- a/sigal/templates/sigal.conf.py +++ b/sigal/templates/sigal.conf.py @@ -95,7 +95,10 @@ ignore_files = [] # Write HTML files. If False, sigal will only process the images. # write_html = True -# Add index.html to the URLs +# Name of the generated HTML files +# output_filename = 'index.html' + +# Add output filename (see above) to the URLs # index_in_url = False # A list of links (tuples (title, URL))