Class: JekyllDictionaries::Generator

Inherits:
Jekyll::Generator
  • Object
show all
Defined in:
lib/jekyll-dictionaries/generator.rb

Constant Summary collapse

CONFIG =
{
  'pages' => {
    'dictionary' => {
      'layout' => 'dictionary',
      'permalink' => 'dictionaries/:name'
    },
    'dictionary_api' => {
      'layout' => 'dictionary_api',
      'permalink' => 'api/dictionaries/:name.json'
    }
  }
}

Instance Method Summary collapse

Instance Method Details

#generate(site) ⇒ Object



24
25
26
27
28
29
30
31
32
33
34
# File 'lib/jekyll-dictionaries/generator.rb', line 24

def generate(site)
  @site = site

  Generators::Theme.new(site).generate

  dictionaries = Generators::Dictionaries.new(site).generate

  dictionaries.each do |dictionary|
    build_dictionary_pages(dictionary)
  end
end