Class: JekyllGeneratorTemplate

Inherits:
Jekyll::Generator
  • Object
show all
Defined in:
jekyll_generator_template.rb

Overview

Describe this Jekyll generator here.

Author:

License:

  • SPDX-License-Identifier: Apache-2.0

Instance Method Summary collapse

Constructor Details

#initialize(config) ⇒ JekyllGeneratorTemplate

Returns a new instance of JekyllGeneratorTemplate.



9
10
11
12
# File 'jekyll_generator_template.rb', line 9

def initialize(config)
  super(config)
  @log = LoggerFactory.new.create_logger('my_generator_template', config, :warn, $stderr)
end

Instance Method Details

#generate(site) ⇒ void

This method returns an undefined value.

Method prescribed by the Jekyll plugin lifecycle.

Parameters:

  • site (Jekyll.Site)

    Automatically provided by Jekyll plugin mechanism



17
18
19
20
21
# File 'jekyll_generator_template.rb', line 17

def generate(site)
  @config = site.config
  @mode = @config['env']['JEKYLL_ENV']
  @log.info "mode=#{@mode}".green
end