Class: Jekyll::PodcastPlayerPageGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll/podcast_player_page_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



5
6
7
8
9
10
11
12
# File 'lib/jekyll/podcast_player_page_generator.rb', line 5

def generate(site)
  if site.layouts.key? 'player_index'
    dir =  site.config['players_dir'] || 'players'
    site.posts.docs.each do |post|
      site.pages << PodcastPlayerPage.new(site, site.source, File.join(dir, post.data['slug']), post)
    end
  end
end