diff --git a/_config.yml b/_config.yml index 8fb4475..3325044 100644 --- a/_config.yml +++ b/_config.yml @@ -18,6 +18,7 @@ date_format: "ordinal" # RSS / Email (optional) subscription links (change if using something like Feedburner) subscribe_rss: /atom.xml subscribe_email: +category_feeds: false # RSS feeds can list your email address if you like email: diff --git a/plugins/category_generator.rb b/plugins/category_generator.rb index d928bce..d291412 100644 --- a/plugins/category_generator.rb +++ b/plugins/category_generator.rb @@ -36,7 +36,7 @@ module Jekyll @name = 'index.html' self.process(@name) # Read the YAML data from the layout page. - self.read_yaml(File.join(base, '_layouts'), 'category_index.html') + self.read_yaml(File.join(base, '_layouts'), 'category_feed.xml') self.data['category'] = category # Set the title for this page. title_prefix = site.config['category_title_prefix'] || 'Category: ' @@ -63,7 +63,7 @@ module Jekyll @name = 'atom.xml' self.process(@name) # Read the YAML data from the layout page. - self.read_yaml(File.join(base, '_layouts'), 'category_feed.xml') + self.read_yaml(File.join(base, '_includes/custom'), 'category_feed.xml') self.data['category'] = category # Set the title for this page. title_prefix = site.config['category_title_prefix'] || 'Category: ' @@ -94,11 +94,13 @@ module Jekyll self.pages << index # Create an Atom-feed for each index. - feed = CategoryFeed.new(self, self.source, category_dir, category) - feed.render(self.layouts, site_payload) - feed.write(self.dest) - # Record the fact that this page has been added, otherwise Site::cleanup will remove it. - self.pages << feed + if self.config['category_feeds'] + feed = CategoryFeed.new(self, self.source, category_dir, category) + feed.render(self.layouts, site_payload) + feed.write(self.dest) + # Record the fact that this page has been added, otherwise Site::cleanup will remove it. + self.pages << feed + end end # Loops through the list of category pages and processes each one.