sosedoff / xml-sitemap

Easy XML sitemap generation for Ruby/Rails/Merb/Sinatra applications
MIT License
57 stars 19 forks source link

sitemap index remains .xml when each file is compressed with .gz extension #11

Open mandye opened 12 years ago

mandye commented 12 years ago

Shoud add one option to

def add(map) raise ArgumentError, 'XmlSitemap::Map object requred!' unless map.kind_of?(XmlSitemap::Map) raise ArgumentError, 'Map is empty!' if map.empty?

  @maps << {
    :loc     => map.index_url(@offsets[map.group]),
    :lastmod => map.created_at.utc.iso8601
  }
  @offsets[map.group] += 1

end

add '.gz' to index entries, if people choose :gzip => true for each map

sosedoff commented 12 years ago

Can you work on this patch?