I can’t figure out what the problem is.
I use systemmap_generator gems in conjunction with mobility and friendly_id.
Here is the sitemmap.rb file:
SitemapGenerator::Sitemap.default_host = "MY_HOST_NAME"
SitemapGenerator::Sitemap.create_index = true
SitemapGenerator::Sitemap.create do
{uk: :ukrainian, ru: :russian}.each_pair do |locale, name|
group(sitemaps_path: "sitemaps/#{locale}/", filename: name) do
add root_path(locale: locale), changefreq: 'daily'
add prices_path(locale: locale)
add about_path(locale: locale)
add contacts_path(locale: locale)
add faq_path(locale: locale)
add services_path(locale: locale)
add articles_path(locale: locale)
Article.friendly.find_each do |article|
add article_path(article, locale: locale), changefreq: 'daily', lastmod: article.updated_at
end
Service.friendly.find_each do |service|
add service_path(service, locale: locale), changefreq: 'daily', lastmod: service.updated_at
end
end
end
end
For the :uk locale everything is generated normally, but for another locale (:ru), links are not generated. Or rather, they are generated, but as for the :uk locale, i.e. without translation. Accordingly, Google does not find these pages and does not index them.
Here is sitemap.xml example for :uk locale: [1]
[1]: https://i.sstatic.net/lG0GwNV9.png
And for :ru locale [2]
[2]: https://i.sstatic.net/v6mFMIo7.png
Can anybody tell me what the problem is?