谁能教我如何将:image的每个页面集成到sitemap.rb
SitemapGenerator::Sitemap.default_host = "http://www.example.com"
SitemapGenerator::Sitemap.create do
add('/index.html', :images => [{
:loc => 'http://www.example.com/image.png',
:title => 'Image' }])
end
# config/sitemap.rb
SitemapGenerator::Sitemap.default_host = 'https://www.grassphere.com'
SitemapGenerator::Sitemap.create do
add root_path, :priority => 0.5, :changefreq => 'daily'
end
end
可以通过SitemapGenerator来抓取:image的站点地图的工作原理,谢谢