Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: getnikola/nikola
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a079656f1bae^
Choose a base ref
...
head repository: getnikola/nikola
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 0e6baa9a8297
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Dec 5, 2016

  1. Fixing plugin name.

    felixfontein committed Dec 5, 2016
    Copy the full SHA
    a079656 View commit details
  2. Copy the full SHA
    0e6baa9 View commit details
Showing with 23 additions and 4 deletions.
  1. +22 −3 nikola/nikola.py
  2. +1 −1 nikola/plugins/task/tagcloud.plugin
25 changes: 22 additions & 3 deletions nikola/nikola.py
Original file line number Diff line number Diff line change
@@ -351,6 +351,14 @@
}
}

# Mapping old pre-taxonomy plugin names to new post-taxonomy plugin names
PLUGIN_NAME_MAP = {
"render_archive": ["classify_archive"],
"render_authors": ["classify_authors"],
"render_indexes": ["classify_indexes", "classify_page_index", "classify_sections"],
"render_tags": ["classify_categories", "render_tag_cloud", "classify_tags"],
}


def _enclosure(post, lang):
"""Add an enclosure to RSS."""
@@ -798,14 +806,25 @@ def __init__(self, **config):
utils.LOGGER.warn('The moot comment system has been renamed to muut by the upstream. Setting COMMENT_SYSTEM to "muut".')
self.config['COMMENT_SYSTEM'] = 'muut'

# Handle old plugin names (from before merging the taxonomy PR #2535)
for old_plugin_name, new_plugin_names in PLUGIN_NAME_MAP.items():
if old_plugin_name in self.config['DISABLED_PLUGINS']:
missing_plugins = []
for plugin_name in new_plugin_names:
if plugin_name not in self.config['DISABLED_PLUGINS']:
missing_plugins.apped(plugin_name)
utils.LOGGER.warn('The "{}" plugin was replaced by several taxonomy plugins (see PR #2535): {}'.format(old_plugin_name, ', '.join(new_plugin_names)))
utils.LOGGER.warn('You are currently disabling "{}", but not the following new taxonomy plugins: {}'.format(old_plugin_name, ', '.join(missing_plugins)))
utils.LOGGER.warn('Please also disable these new plugins or remove "{}" from the DISABLED_PLUGINS list.'.format(old_plugin_name))
if missing_plugins:
self.config['DISABLED_PLUGINS'].extend(missing_plugins)

# Disable RSS. For a successful disable, we must have both the option
# false and the plugin disabled through the official means.
if 'generate_rss' in self.config['DISABLED_PLUGINS'] and self.config['GENERATE_RSS'] is True:
utils.LOGGER.warn('Please use GENERATE_RSS to disable RSS feed generation, instead of mentioning generate_rss in DISABLED_PLUGINS.')
self.config['GENERATE_RSS'] = False

if not self.config['GENERATE_RSS'] and 'generate_rss' not in self.config['DISABLED_PLUGINS']:
self.config['DISABLED_PLUGINS'].append('generate_rss')

# PRETTY_URLS defaults to enabling STRIP_INDEXES unless explicitly disabled
if self.config.get('PRETTY_URLS') and 'STRIP_INDEXES' not in config:
self.config['STRIP_INDEXES'] = True
2 changes: 1 addition & 1 deletion nikola/plugins/task/tagcloud.plugin
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Core]
name = tagcloud
name = render_tag_cloud
module = tagcloud

[Documentation]