Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #2591 #2594

Merged
merged 8 commits into from Dec 11, 2016

Conversation

Projects
None yet
2 participants
@felixfontein
Copy link
Contributor

commented Dec 10, 2016

Adding a lot of special-case logic to allow to fix #2591.

@felixfontein felixfontein requested a review from Kwpolska Dec 10, 2016

@felixfontein felixfontein referenced this pull request Dec 10, 2016

Merged

Fixes #2592 #2593

@Kwpolska
Copy link
Member

left a comment

LGTM, and it works. (With only DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED = True in config, but I’d expect it to work nevertheless)


# 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
self.config['DISABLE_INDEXES_PLUGIN_RSS_FEED'] = True

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member

May I just put those in my conf.py instead of messing with disabling plugins?

This comment has been minimized.

Copy link
@felixfontein

felixfontein Dec 11, 2016

Author Contributor

Sure. The messing with disabling plugins is so that backwards compatibility should be kept. I'm adding some more warning messages.

return
# Generate RSS feed
if kw["generate_rss"] and not taxonomy.always_disable_rss:
yield self._generate_classification_page_as_rss(taxonomy, classification, filtered_posts, context['title'], context.get("description"), kw, lang)
if generate_rss:

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member

those two ifs can be merged into one

This comment has been minimized.

Copy link
@felixfontein

felixfontein Dec 11, 2016

Author Contributor

Done.

yield self._generate_classification_page_as_index(taxonomy, classification, filtered_posts, context, kw, lang)
else:
yield self._generate_classification_page_as_list(taxonomy, classification, filtered_posts, context, kw, lang)
if generate_list:

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member
if generate_list and taxonomy.show_list_as_index:
elif generate_list:

This comment has been minimized.

Copy link
@felixfontein

felixfontein Dec 11, 2016

Author Contributor

Done.

Kwpolska added a commit to getnikola/irclogs-site that referenced this pull request Dec 11, 2016

Implement getnikola/nikola#2594
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@felixfontein

This comment has been minimized.

Copy link
Contributor Author

commented Dec 11, 2016

Should DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED be documented in conf.py? (Or even DISABLE_INDEXES_PLUGIN_RSS_FEED?)

@Kwpolska

This comment has been minimized.

Copy link
Member

commented Dec 11, 2016

They could be.

@felixfontein

This comment has been minimized.

Copy link
Contributor Author

commented Dec 11, 2016

I'm done; feel free to merge when you think the latest changes are OK.

@@ -43,6 +43,9 @@ Features
(Issue #1914)
* Added setting ``SHOW_INDEX_PAGE_NAVIGATION`` which enables a basic
page navigation for indexes. (Issue #2299)
* Added settings ``DISABLE_INDEXES_PLUGIN_INDEX_AND_ATOM_FEED`` and

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member

PS. I would personally add new changelog entries at the top, but that’s pretty unimportant.

@@ -1030,6 +1030,14 @@ MARKDOWN_EXTENSIONS = ['fenced_code', 'codehilite', 'extra']
# change it for a FeedBurner feed or something else.
# RSS_LINK = None

# The following settings allow to disable specific parts of the indexes plugin

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member

Wall of mumbo jumbo.

Special settings to disable only parts of the indexes plugin (to allow RSS but no blog indexes, or to allow blog indexes and Atom but no site-wide RSS). Use with care.

Also, those should appear as close to the bottom of the file as possible.

This comment has been minimized.

Copy link
@felixfontein

felixfontein Dec 11, 2016

Author Contributor

Better now?

This comment has been minimized.

Copy link
@Kwpolska

Kwpolska Dec 11, 2016

Member

Much better.

@Kwpolska Kwpolska merged commit 2d1df75 into master Dec 11, 2016

0 of 5 checks passed

codacy/pr Hang in there, Codacy is reviewing your Pull request.
Details
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details

@Kwpolska Kwpolska deleted the fixing-2591 branch Dec 11, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.