我应该添加到站点地图以正确工作? 我使用gem ' sitemap_generator' 。使用gem?
是个好主意sitemap.rb
SitemapGenerator::Sitemap.default_host = "http://localhost:3000"
SitemapGenerator::Sitemap.adapter = SitemapGenerator::WaveAdapter.new
SitemapGenerator::Sitemap.create do
add root_path
add news_index_path, changefreq: 'weekly'
add castings_path
add premium_path
News.find_each do |news|
add news_index_path(news), :lastmod => news.updated_at
end
end