diff --git a/app/controllers/sitemap_controller.rb b/app/controllers/sitemap_controller.rb index f5ce44ceca..103b6e93ee 100644 --- a/app/controllers/sitemap_controller.rb +++ b/app/controllers/sitemap_controller.rb @@ -3,7 +3,7 @@ class SitemapController < ApplicationController def index headers['Content-Type'] = 'application/xml' - @pages = ['shops', 'map', 'producers', 'groups'] + @page_urls = [shops_url, map_url, producers_url, groups_url] @enterprises = Enterprise.is_hub @groups = EnterpriseGroup.all respond_to :xml diff --git a/app/views/sitemap/index.xml.haml b/app/views/sitemap/index.xml.haml index f961b75899..dac6032a15 100644 --- a/app/views/sitemap/index.xml.haml +++ b/app/views/sitemap/index.xml.haml @@ -1,8 +1,8 @@ !!! XML %urlset{xmlns: "http://www.sitemaps.org/schemas/sitemap/0.9"} - - for page in @pages + - for page_url in @page_urls %url - %loc= root_url + page + %loc= page_url %changefreq monthly - for enterprise in @enterprises @@ -14,4 +14,4 @@ - for group in @groups %url %loc= group_url(group) - %changefreq yearly + %changefreq monthly