Class: Jekyll::AmethystPlugin::AuthorPageGenerator

Inherits:
Generator
  • Object
show all
Defined in:
lib/jekyll-theme-amethyst.rb

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



91
92
93
94
95
96
97
98
99
100
101
# File 'lib/jekyll-theme-amethyst.rb', line 91

def generate(site)
	site.data["authors"]&.each do |slug, name|
		site.pages << AuthorPageWithoutAFile.new(site, site.source, 'author', "#{slug}.html").tap do |page|
			page.data.merge!(
				"layout" => "posts-author",
				"title" => name,
				"author" => slug
			)
		end
	end
end