Skip to content
Permalink
Browse files
Split Atom generation out of index generation
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 1, 2018
1 parent ecedddd commit c21b7888fa34f69374a676930c547eb8b13b5a29
@@ -643,18 +643,18 @@ class Taxonomy(BasePlugin):
The template to use for the subcategories list when
show_list_as_subcategories_list is True.
generate_atom_feeds_for_post_lists = False:
Whether to generate Atom feeds for post lists in case GENERATE_ATOM is set.
template_for_single_list = "tagindex.tmpl":
The template to use for the post list for one classification.
template_for_classification_overview = "list.tmpl":
The template to use for the classification overview page.
Set to None to avoid generating overviews.
always_disable_atom = False:
Whether to always disable Atom feed generation.
always_disable_rss = False:
Whether to always disable RSS feed generation
Whether to always disable RSS feed generation.
apply_to_posts = True:
Whether this classification applies to posts.
@@ -698,9 +698,9 @@ class Taxonomy(BasePlugin):
show_list_as_subcategories_list = False
show_list_as_index = False
subcategories_list_template = "taxonomy_list.tmpl"
generate_atom_feeds_for_post_lists = False
template_for_single_list = "tagindex.tmpl"
template_for_classification_overview = "list.tmpl"
always_disable_atom = False
always_disable_rss = False
apply_to_posts = True
apply_to_pages = False
@@ -860,6 +860,10 @@ def should_generate_classification_page(self, classification: str, post_list: 't
"""Only generates list of posts for classification if this function returns True."""
return True

def should_generate_atom_for_classification_page(self, classification: str, post_list: 'typing.List[nikola.post.Post]', lang: str) -> bool:
"""Only generates Atom feed for list of posts for classification if this function returns True."""
return self.should_generate_classification_page(classification, post_list, lang)

def should_generate_rss_for_classification_page(self, classification: str, post_list: 'typing.List[nikola.post.Post]', lang: str) -> bool:
"""Only generates RSS feed for list of posts for classification if this function returns True."""
return self.should_generate_classification_page(classification, post_list, lang)
@@ -40,7 +40,6 @@ 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
@@ -45,9 +45,9 @@ class ClassifyCategories(Taxonomy):
include_posts_from_subhierarchies = True
include_posts_into_hierarchy_root = False
show_list_as_subcategories_list = False
generate_atom_feeds_for_post_lists = True
template_for_classification_overview = "tags.tmpl"
always_disable_rss = False
always_disable_atom = False
apply_to_posts = True
apply_to_pages = False
minimum_post_count_per_classification_in_overview = 1
@@ -41,10 +41,10 @@ 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_single_list = "list.tmpl"
template_for_classification_overview = None
always_disable_rss = True
always_disable_atom = True
apply_to_posts = False
apply_to_pages = True
omit_empty_classifications = True
@@ -40,7 +40,6 @@ 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
@@ -57,7 +56,7 @@ class ClassifySections(Taxonomy):
Example:
link://section_index_atom/cars => /cars/index.atom""",
link://section_index_atom/cars => /cars/feed.atom""",
'section_index_rss': """Link to the RSS feed for a section.
Example:
@@ -42,9 +42,9 @@ class ClassifyTags(Taxonomy):
more_than_one_classifications_per_post = True
has_hierarchy = False
show_list_as_subcategories_list = False
generate_atom_feeds_for_post_lists = True
template_for_classification_overview = "tags.tmpl"
always_disable_rss = False
always_disable_atom = False
apply_to_posts = True
apply_to_pages = False
omit_empty_classifications = True

0 comments on commit c21b788

Please sign in to comment.