Skip to content

Commit

Permalink
Some pecularities regarding RSS feeds.
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Oct 19, 2016
1 parent 9e55cbb commit 0886a96
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nikola/plugin_categories.py
Expand Up @@ -504,6 +504,8 @@ class Taxonomy(BasePlugin):
# The template to use for the classification overview page.
# Set to None to avoid generating overviews.
template_for_classification_overview = "list.tmpl"
# Whether to always disable RSS feed generation
always_disable_rss = False
# Whether this classification applies to posts.
apply_to_posts = True
# Whether this classification applies to pages.
Expand Down
1 change: 1 addition & 0 deletions nikola/plugins/task/archive.py
Expand Up @@ -46,6 +46,7 @@ class Archive(Taxonomy):
include_posts_into_hierarchy_root = True
generate_atom_feeds_for_post_lists = False
template_for_classification_overview = None
always_disable_rss = True
apply_to_posts = True
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
Expand Down
1 change: 1 addition & 0 deletions nikola/plugins/task/page_index.py
Expand Up @@ -46,6 +46,7 @@ class PageIndex(Taxonomy):
generate_atom_feeds_for_post_lists = False
template_for_list_of_one_classification = "list.tmpl"
template_for_classification_overview = None
always_disable_rss = True
apply_to_posts = False
apply_to_pages = True
omit_empty_classifications = True
Expand Down
2 changes: 1 addition & 1 deletion nikola/plugins/task/taxonomies.py
Expand Up @@ -274,7 +274,7 @@ def _generate_classification_page(self, taxonomy, classification, post_list, lan
yield self._generate_subclassification_page(taxonomy, node, context, kw, lang)
return
# Generate RSS feed
if kw["generate_rss"]:
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)
# Render HTML
if taxonomy.show_list_as_index:
Expand Down

0 comments on commit 0886a96

Please sign in to comment.