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
我將如何實現它在這個代碼?