kjvarga/sitemap_generator — pull request #61 by tulios (2012-02-06 17:12:19+00:00)
Title: Allowing the inclusion of old files for incremental generation of sitemap

In my current project we have a huge amount of links and videos to generate sitemap, but the big
problem is that we have a lot of links and videos every day because of that we decide to make the build of the sitemap daily.

Is possible to configure the start index of the namer, however the sitemap index is generated without the old files. I know this
is very specific of my project but I am pulling back, maybe some one have the same problem.

The usage is:

...
group(sitemaps_namer: my_namer, include_all_files: true) do
...
end

We pass an option :include_all_files and the generation of sitemap index will take in count the numbers before the start value.

...
my_namer = SitemapGenerator::SitemapNamer.new("my-sitemap", start: 3)
...
group(sitemaps_namer: my_namer, include_all_files: true) do
...
end

In the index we will have
...

http://site/my-sitemap1.xml.gz

http://site/my-sitemap2.xml.gz

http://site/my-sitemap3.xml.gz