mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
#1027: Use url helpers for basic pages
Set groups change frequency to monthly.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user