diff --git a/nikola/nikola.py b/nikola/nikola.py index 1ca7c6764..6fe076e9a 100644 --- a/nikola/nikola.py +++ b/nikola/nikola.py @@ -891,6 +891,7 @@ def __init__(self, **config): utils.LOGGER.warning('You are currently disabling "{}", but not the following new taxonomy plugins: {}'.format(old_plugin_name, ', '.join(missing_plugins))) utils.LOGGER.warning('Please also disable these new plugins or remove "{}" from the DISABLED_PLUGINS list.'.format(old_plugin_name)) self.config['DISABLED_PLUGINS'].extend(missing_plugins) + # Special-case logic for "render_indexes" to fix #2591 if 'render_indexes' in self.config['DISABLED_PLUGINS']: if 'generate_rss' in self.config['DISABLED_PLUGINS'] or self.config['GENERATE_RSS'] is False: @@ -1000,6 +1001,9 @@ def __init__(self, **config): self.state._set_site(self) self.cache._set_site(self) + # WebP files have no official MIME type yet, but we need to recognize them (Issue #3671) + mimetypes.add_type('image/webp', '.webp') + def _filter_duplicate_plugins(self, plugin_list): """Find repeated plugins and discard the less local copy.""" def plugin_position_in_places(plugin): diff --git a/nikola/plugins/task/galleries.py b/nikola/plugins/task/galleries.py index 25bc91c9e..7874cf169 100644 --- a/nikola/plugins/task/galleries.py +++ b/nikola/plugins/task/galleries.py @@ -725,9 +725,6 @@ def gallery_rss(self, img_list, dest_img_list, img_titles, lang, permalink, outp def make_url(url): return urljoin(self.site.config['BASE_URL'], url.lstrip('/')) - # WebP is not yet an official MIME type but we need to recognize them - mimetypes.add_type('image/webp', '.webp') - all_data = list(zip(img_list, dest_img_list, img_titles)) if self.kw['sort_by_date']: