#1027: Use url helpers for basic pages

Set groups change frequency to monthly.
This commit is contained in:
Paul Mackay
2017-01-12 10:18:30 +00:00
parent fc400741b4
commit d80f080af5
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -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