Module: SitemapBoiler
- Defined in:
- lib/sitemap_boiler.rb,
lib/sitemap_boiler/config.rb,
lib/sitemap_boiler/version.rb,
lib/sitemap_boiler/url_composer.rb,
lib/sitemap_boiler/default_config.rb,
lib/sitemap_boiler/sitemap_generator.rb
Defined Under Namespace
Classes: Config, DefaultConfig, SitemapGenerator, URLComposer
Constant Summary collapse
- VERSION =
"0.1.0"
Class Method Summary collapse
Class Method Details
.generate(config_hash, output_dir) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/sitemap_boiler.rb', line 6 def self.generate(config_hash, output_dir) config = SitemapBoiler::Config.new(config_hash) generator = SitemapBoiler::SitemapGenerator.new(config) config[:localizations].each do |localization| file_suffix = localization['prefix'] || 'default' generator.write(localization, "#{output_dir}/sitemap-#{file_suffix}.xml") end end |