SitemapGenerator is a framework-agnostic XML Sitemap generator written in Ruby with automatic Rails integration. It supports Video, News, Image, Mobile, PageMap and Alternate Links sitemap extensions and includes Rake tasks for managing your sitemaps, as well as many other great features.
MIT License
2.44k
stars
276
forks
source link
How to remove default priority, lastmod and changefreq from all urls #395
I'm basically having the same problem as mentioned in other issues. Adding nil value in add config solves part of the problem, Remove lastmod, changefreq and priority from urls but still generate on first link (default_host).
I'm basically having the same problem as mentioned in other issues. Adding nil value in add config solves part of the problem, Remove lastmod, changefreq and priority from urls but still generate on first link (default_host).
Code:
SitemapGenerator::Sitemap.default_host = "http://localhost:8080/" SitemapGenerator::Sitemap.compress = false
SitemapGenerator::Sitemap.create do add "/login", changefreq: nil, priority: nil, lastmod: nil
Result:
url loc > http://localhost:8080/ </loc lastmod> 2022-03-10T13:13:11-03:00 </lastmod changefreq> weekly </changefreq priority> 1.0 </priority /url url loc> http://localhost:8080/login </loc /url