|
1 | 1 | SitemapGenerator::Sitemap.default_host = 'https://registry.seqco.de' |
2 | | -SitemapGenerator::Sitemap.sitemaps_path = '/' |
3 | 2 |
|
4 | 3 | SitemapGenerator::Sitemap.create do |
5 | | - |
6 | | - # Global index |
7 | | - # %w[pages names genomes strains registers].each do |base| |
8 | | - # add_to_index 'sitemaps/%s.xml.gz' % base |
9 | | - # end |
10 | | - |
11 | 4 | # Top-level pages |
12 | 5 | group(filename: :pages, sitemaps_path: 'sitemaps/') do |
13 | 6 | extend HelpTopics |
|
53 | 46 | group(filename: :names, sitemaps_path: 'sitemaps/') do |
54 | 47 | Name.all_public.find_each do |name| |
55 | 48 | add name_path(name), lastmod: name.updated_at, |
56 | | - changefreq: :weekly, priority: 0.6 |
| 49 | + changefreq: :monthly, priority: 0.6 |
57 | 50 | add wiki_name_path(name), lastmod: name.updated_at, |
58 | | - changefreq: :weekly, priority: 0.1 |
| 51 | + changefreq: :monthly, priority: 0.1 |
59 | 52 | # TODO: |
60 | 53 | # - add network |
61 | 54 | end |
|
65 | 58 | group(filename: :genomes, sitemaps_path: 'sitemaps/') do |
66 | 59 | Genome.all_public.find_each do |genome| |
67 | 60 | add genome_path(genome), lastmod: genome.updated_at, |
68 | | - changefreq: :weekly, priority: 0.4 |
| 61 | + changefreq: :monthly, priority: 0.4 |
69 | 62 | # TODO: |
70 | 63 | # - add sample_map |
71 | 64 | end |
|
75 | 68 | group(filename: :strains, sitemaps_path: 'sitemaps/') do |
76 | 69 | Strain.find_each do |strain| |
77 | 70 | add strain_path(strain), lastmod: strain.updated_at, |
78 | | - changefreq: :weekly, priority: 0.4 |
| 71 | + changefreq: :monthly, priority: 0.4 |
79 | 72 | end |
80 | 73 | end |
81 | 74 |
|
82 | 75 | # Registers |
83 | 76 | group(filename: :registers, sitemaps_path: 'sitemaps/') do |
84 | 77 | Register.where(validated: true).find_each do |register| |
85 | 78 | add register_path(register), lastmod: register.updated_at, |
86 | | - changefreq: :weekly, priority: 0.6 |
| 79 | + changefreq: :monthly, priority: 0.6 |
| 80 | + add table_register_path(register), lastmod: register.updated_at, |
| 81 | + changefreq: :monthly, priority: 0.2 |
| 82 | + add list_register_path(register), lastmod: register.updated_at, |
| 83 | + changefreq: :monthly, priority: 0.2 |
87 | 84 | # TODO: |
88 | | - # - add table |
89 | | - # - add list |
90 | 85 | # - add sample_map |
91 | 86 | # - add tree |
92 | 87 | end |
93 | 88 | end |
94 | 89 |
|
95 | | - # TODO Add members for: |
96 | | - # - authors |
97 | | - # - journals |
98 | | - # - publications |
99 | | - # - subjects |
| 90 | + # Authors |
| 91 | + group(filename: :authors, sitemaps_path: 'sitemaps/') do |
| 92 | + Author.find_each do |author| |
| 93 | + add author_path(author), lastmod: author.updated_at, |
| 94 | + changefreq: :monthly, priority: 0.2 |
| 95 | + end |
| 96 | + end |
| 97 | + |
| 98 | + # Journals |
| 99 | + group(filename: :journals, sitemaps_path: 'sitemaps/') do |
| 100 | + Publication.journals.find_each do |journal| |
| 101 | + add journal_path(journal.journal), |
| 102 | + changefreq: :monthly, priority: 0.2 |
| 103 | + end |
| 104 | + end |
| 105 | + |
| 106 | + # Publications |
| 107 | + group(filename: :publications, sitemaps_path: 'sitemaps/') do |
| 108 | + Publication.find_each do |publication| |
| 109 | + add publication_path(publication), lastmod: publication.updated_at, |
| 110 | + changefreq: :monthly, priority: 0.2 |
| 111 | + end |
| 112 | + end |
100 | 113 |
|
| 114 | + # Subjects |
| 115 | + group(filename: :subjects, sitemaps_path: 'sitemaps/') do |
| 116 | + Subject.find_each do |subject| |
| 117 | + add subject_path(subject), lastmod: subject.updated_at, |
| 118 | + changefreq: :monthly, priority: 0.1 |
| 119 | + end |
| 120 | + end |
101 | 121 | end |
102 | 122 |
|
0 commit comments