Class: Jekyll::J1SeoTag
- Inherits:
-
Generator
- Object
- Generator
- Jekyll::J1SeoTag
- Defined in:
- lib/starter_web/_plugins/seo/j1-seo-tags.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
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/starter_web/_plugins/seo/j1-seo-tags.rb', line 25 def generate(site) @site = site @mode = site.config['environment'] @template = site.config['theme'] @project_path = File.join(File.dirname(__FILE__)).sub('_plugins/seo', '') @module_data_path = File.join(File.join(@project_path, '_data')) @module_config_path = File.join(File.join(@module_data_path, 'plugins')) @module_template_path = File.join(File.join(@module_data_path, 'templates')) @module_config_default = YAML::load(File.open(File.join(@module_config_path, 'defaults', 'seo-tags.yml'))) @module_config_user = YAML::load(File.open(File.join(@module_config_path, 'seo-tags.yml'))) @module_config_default_settings = @module_config_default['defaults'] @module_config_user_settings = @module_config_user['settings'] @module_config = @module_config_default_settings.merge!(@module_config_user_settings) if plugin_disabled? Jekyll.logger.info "J1 SEO Tags:", "disabled" return else Jekyll.logger.info "J1 SEO Tags:", "enabled" Jekyll.logger.info "J1 SEO Tags:", "generate seo tags" end end |