fix(sitemap): remove duplicate index

This commit is contained in:
Brett Chalupa 2022-12-11 19:58:42 -05:00
parent 8d843582dc
commit c4ecfc0748

View file

@ -8,12 +8,10 @@ SitemapGenerator::Sitemap.default_host = 'https://book.dragonriders.community'
SitemapGenerator::Sitemap.public_path = 'book'
SitemapGenerator::Sitemap.compress = false
SitemapGenerator::Sitemap.create do
add '/', changefreq: 'weekly', priority: 0.9
# assumes no nested URLs
Dir.glob('book/*.html').each do |file|
file = file.split('/').last
next if file == "index.html"
next if file == "index.html" || file == "introduction.html"
add "/#{file}", changefreq: 'weekly'
end
end