Sha256: 47466fceb52630cbd3fe8e1c5a20c599c6e30ed2083037b2d3ec8713dc586a0d

Contents?: true

Size: 1.34 KB

Versions: 7

Compression:

Stored size: 1.34 KB

Contents

SitemapGenerator::Sitemap.default_host = "http://www.example.com"

SitemapGenerator::Sitemap.create(
    :include_root => true, :include_index => true,
    :filename => :new_sitemaps, :sitemaps_path => 'fr/') do

  add('/one', :priority => 0.7, :changefreq => 'daily')

  # Test a new location and filename and sitemaps host
  group(:sitemaps_path => 'en/', :filename => :xxx,
      :sitemaps_host => "http://newhost.com") do

    add '/two'
    add '/three'
  end

  # Test a deprecated namer
  group(:sitemaps_namer => SitemapGenerator::SitemapNamer.new(:abc, :start => 3)) do
    add '/four'
    add '/five'
    add '/six'
  end

  # Test a simple namer
  group(:sitemaps_namer => SitemapGenerator::SimpleNamer.new(:def)) do
    add '/four'
    add '/five'
    add '/six'
  end

  add '/seven'

  # This should be in a file of its own.
  # Not technically valid to have a link with a different host, but people like
  # to do strange things sometimes.
  group(:sitemaps_host => "http://exceptional.com") do
    add '/eight'
    add '/nine'
  end

  add '/ten'

  # This should have no effect.  Already added default links.
  group(:include_root => true, :include_index => true) {}

  # Not technically valid to have a link with a different host, but people like
  # to do strange things sometimes
  add "/merchant_path", :host => "https://www.merchanthost.com"
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
sitemap_generator-4.3.1 spec/files/sitemap.groups.rb
sitemap_generator-4.3.0 spec/files/sitemap.groups.rb
sitemap_generator-4.2.0 spec/files/sitemap.groups.rb
sitemap_generator-4.1.1 spec/files/sitemap.groups.rb
sitemap_generator-4.1.0 spec/files/sitemap.groups.rb
sitemap_generator-4.0.1 spec/files/sitemap.groups.rb
sitemap_generator-4.0 spec/files/sitemap.groups.rb