Skip to content
Permalink
Browse files

Allowing to prevent Atom feed generation for classification post list…

…s. (Nobody wants that except tag and category pages.)
  • Loading branch information
felixfontein committed Oct 19, 2016
1 parent 966cb94 commit 9e55cbb08d0e8cac0291463e5cdb4d56bae3f011
@@ -497,6 +497,8 @@ class Taxonomy(BasePlugin):
# Whether to show the posts for one classification as an index or
# as a post list.
show_list_as_index = False
# Whether to generate Atom feeds for post lists in case GENERATE_ATOM is set.
generate_atom_feeds_for_post_lists = False
# The template to use for the post list for one classification.
template_for_list_of_one_classification = "tagindex.tmpl"
# The template to use for the classification overview page.
@@ -44,6 +44,7 @@ class Archive(Taxonomy):
has_hierarchy = True
include_posts_from_subhierarchies = True
include_posts_into_hierarchy_root = True
generate_atom_feeds_for_post_lists = False
template_for_classification_overview = None
apply_to_posts = True
apply_to_pages = False
@@ -42,6 +42,7 @@ class ClassifyAuthors(Taxonomy):
overview_page_variable_name = "authors"
more_than_one_classifications_per_post = False
has_hierarchy = False
generate_atom_feeds_for_post_lists = False
template_for_classification_overview = "authors.tmpl"
apply_to_posts = True
apply_to_pages = False
@@ -43,6 +43,7 @@ class PageIndex(Taxonomy):
has_hierarchy = True
include_posts_from_subhierarchies = False
show_list_as_index = False
generate_atom_feeds_for_post_lists = False
template_for_list_of_one_classification = "list.tmpl"
template_for_classification_overview = None
apply_to_posts = False
@@ -41,6 +41,7 @@ class ClassifySections(Taxonomy):
overview_page_variable_name = "sections"
more_than_one_classifications_per_post = False
has_hierarchy = False
generate_atom_feeds_for_post_lists = False
template_for_classification_overview = None
apply_to_posts = True
apply_to_pages = False
@@ -201,7 +201,7 @@ def _generate_classification_page_as_list(self, taxonomy, classification, filter
task['basename'] = str(self.name)
yield task

if self.site.config['GENERATE_ATOM']:
if taxonomy.generate_atom_feeds_for_post_lists and self.site.config['GENERATE_ATOM']:
yield self._generate_classification_page_as_list_atom(kind, taxonomy, classification, filtered_posts, context, kw, lang)

def _filter_list(self, post_list, lang):

0 comments on commit 9e55cbb

Please sign in to comment.
You can’t perform that action at this time.