style: format code for consistency
- Ensure consistent use of double quotes for strings in the Gemfile and sitemap configuration files. - Add spaces for better readability in array declarations within the RefreshSitemapWorker. These changes improve the readability of the code without changing any functionality. Adhering to a consistent coding style helps maintainability and team collaboration.
This commit is contained in:
parent
6544f0247c
commit
1f47ba59c9
2
Gemfile
2
Gemfile
@ -48,7 +48,7 @@ gem "friendly_id", "~> 5.5"
|
|||||||
gem "kaminari", "~> 1.2"
|
gem "kaminari", "~> 1.2"
|
||||||
|
|
||||||
gem "meta-tags", "~> 2.22"
|
gem "meta-tags", "~> 2.22"
|
||||||
gem 'sitemap_generator', '~> 6.3'
|
gem "sitemap_generator", "~> 6.3"
|
||||||
|
|
||||||
# gem "whenever", "~> 1.0"
|
# gem "whenever", "~> 1.0"
|
||||||
gem "ruby-openai", "~> 7.3"
|
gem "ruby-openai", "~> 7.3"
|
||||||
|
@ -17,7 +17,7 @@ module SeoConcern
|
|||||||
title: :title,
|
title: :title,
|
||||||
description: :description,
|
description: :description,
|
||||||
type: "website",
|
type: "website",
|
||||||
url: request.original_url,
|
url: request.original_url
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
@ -20,10 +20,10 @@ class RefreshSitemapWorker
|
|||||||
changefreq: "daily",
|
changefreq: "daily",
|
||||||
priority: 0.7,
|
priority: 0.7,
|
||||||
lastmod: art.updated_at,
|
lastmod: art.updated_at,
|
||||||
images: [{
|
images: [ {
|
||||||
loc: url_for(art.image),
|
loc: url_for(art.image),
|
||||||
title: "#{art.city.name} Weather Art - #{art.weather_date.strftime('%B %d, %Y')}"
|
title: "#{art.city.name} Weather Art - #{art.weather_date.strftime('%B %d, %Y')}"
|
||||||
}]
|
} ]
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -2,26 +2,26 @@
|
|||||||
SitemapGenerator::Sitemap.default_host = "https://todayaiweather.com"
|
SitemapGenerator::Sitemap.default_host = "https://todayaiweather.com"
|
||||||
|
|
||||||
SitemapGenerator::Sitemap.create do
|
SitemapGenerator::Sitemap.create do
|
||||||
add root_path, changefreq: 'daily', priority: 1.0
|
add root_path, changefreq: "daily", priority: 1.0
|
||||||
add cities_path, changefreq: 'daily', priority: 0.9
|
add cities_path, changefreq: "daily", priority: 0.9
|
||||||
add arts_path, changefreq: 'daily', priority: 0.9
|
add arts_path, changefreq: "daily", priority: 0.9
|
||||||
|
|
||||||
City.find_each do |city|
|
City.find_each do |city|
|
||||||
add city_path(city),
|
add city_path(city),
|
||||||
changefreq: 'daily',
|
changefreq: "daily",
|
||||||
priority: 0.8,
|
priority: 0.8,
|
||||||
lastmod: city.updated_at
|
lastmod: city.updated_at
|
||||||
end
|
end
|
||||||
|
|
||||||
WeatherArt.includes(:city).find_each do |art|
|
WeatherArt.includes(:city).find_each do |art|
|
||||||
add city_weather_art_path(art.city, art),
|
add city_weather_art_path(art.city, art),
|
||||||
changefreq: 'daily',
|
changefreq: "daily",
|
||||||
priority: 0.7,
|
priority: 0.7,
|
||||||
lastmod: art.updated_at,
|
lastmod: art.updated_at,
|
||||||
images: [{
|
images: [ {
|
||||||
loc: url_for(art.image),
|
loc: url_for(art.image),
|
||||||
title: "#{art.city.name} Weather Art - #{art.weather_date.strftime('%B %d, %Y')}"
|
title: "#{art.city.name} Weather Art - #{art.weather_date.strftime('%B %d, %Y')}"
|
||||||
}] if art.image.attached?
|
} ] if art.image.attached?
|
||||||
end
|
end
|
||||||
# Put links creation logic here.
|
# Put links creation logic here.
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user