0
我想将lastmod
添加到我的站点地图中,但我找不到应该如何格式化的好例子。如何添加lastmod到我的应用程序的站点地图
这里是我目前有工作:
控制器:
class SitemapsController < ApplicationController
def show
@events = Event.where(block_search_engines: false, status: 1)
end
end
显示建设者:
xml.instruct!
xml.urlset "xmlns" => "http://www.sitemaps.org/schemas/sitemap/0.9" do
@events.each do |event|
xml.url do
xml.loc present_url(event.slug)
xml.priority 1.0
end
end
end
我将如何实现它在这个代码?