Class: JekyllFeed::Generator
- Inherits:
-
Jekyll::Generator
- Object
- Jekyll::Generator
- JekyllFeed::Generator
- Defined in:
- lib/jekyll-feed/generator.rb
Instance Method Summary collapse
-
#generate(site) ⇒ Object
Main plugin action, called by Jekyll-core.
Instance Method Details
#generate(site) ⇒ Object
Main plugin action, called by Jekyll-core
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/jekyll-feed/generator.rb', line 9 def generate(site) @site = site if disabled_in_development? Jekyll.logger.info "Jekyll Feed:", "Skipping feed generation in development" return end collections.each do |name, | Jekyll.logger.info "Jekyll Feed:", "Generating feed for #{name}" (["categories"] + [nil]).each do |category| path = feed_path(:collection => name, :category => category) next if file_exists?(path) @site.pages << make_page(path, :collection => name, :category => category) end end generate_feed_by_tag if config["tags"] && !@site..empty? end |