forked from coderdojo-japan/coderdojo.jp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsitemap.rb
48 lines (41 loc) · 1.36 KB
/
sitemap.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# Set the host name for URL creation
SitemapGenerator::Sitemap.default_host = "https://coderdojo.jp"
SitemapGenerator::Sitemap.create do
# Put links creation logic here.
#
# The root path '/' and sitemap index file are added automatically for you.
# Links are added to the Sitemap in the order they are specified.
#
# Usage: add(path, options={})
# (default options are used if you don't specify)
#
# Defaults: :priority => 0.5, :changefreq => 'weekly',
# :lastmod => Time.now, :host => default_host
add events_path, priority: 0.9
add '/kata', priority: 0.9
add partnership_path, priority: 0.8
add stats_path, priority: 0.8
add charter_path, priority: 0.7
add podcasts_path, priority: 0.6
Podcast.find_each do |episode|
add podcast_path(episode), lastmod: episode.updated_at, priority: 0.6
end
add docs_path, priority: 0.5
last_commit_date = Document.first.updated_at
Document.all.each do |doc|
add doc.url, lastmod: last_commit_date, priority: 0.5
end
add teikan_path, priority: 0.4
add privacy_path, priority: 0.4
# Examples:
#
# Add '/articles'
#
# add articles_path, :priority => 0.7, :changefreq => 'daily'
#
# Add all articles:
#
# Article.find_each do |article|
# add article_path(article), :lastmod => article.updated_at
# end
end