chore: update keywords for SEO optimization

- Refactor keywords in cities_controller.rb
- Refactor keywords in weather_arts_controller.rb
- Refactor keywords in application.html.erb

This change improves the SEO of the application by updating
keywords to include 'ai' and 'ai web', which are more relevant
and likely to enhance search visibility. The previous keywords
were less optimized for current trends in AI-related searches.
This commit is contained in:
songtianlun 2025-02-24 14:12:51 +08:00
parent da2f4f6c86
commit b2cc7e7016
3 changed files with 3 additions and 3 deletions

View File

@ -46,7 +46,7 @@ class CitiesController < ApplicationController
set_meta_tags( set_meta_tags(
title: @city.name, title: @city.name,
description: "Experience #{@city.name}'s weather through AI-generated art. Daily updates of weather conditions visualized through artificial intelligence.", description: "Experience #{@city.name}'s weather through AI-generated art. Daily updates of weather conditions visualized through artificial intelligence.",
keywords: "#{@city.name}, #{@city.country.name}, ai art, ai weather, weather art, AI visualization", keywords: "#{@city.name}, #{@city.country.name}, ai, ai web, ai art, ai weather, weather art, AI visualization",
og: { og: {
image: @city.latest_weather_art&.image&.attached? ? url_for(@city.latest_weather_art.image) : nil image: @city.latest_weather_art&.image&.attached? ? url_for(@city.latest_weather_art.image) : nil
} }

View File

@ -17,7 +17,7 @@ class WeatherArtsController < ApplicationController
set_meta_tags( set_meta_tags(
title: "#{@city.name} Weather Art - #{@weather_art.weather_date.strftime('%B %d, %Y')}", title: "#{@city.name} Weather Art - #{@weather_art.weather_date.strftime('%B %d, %Y')}",
description: "#{@city.name}'s weather visualized through AI art. #{@weather_art.description} at #{@weather_art.temperature}°C.", description: "#{@city.name}'s weather visualized through AI art. #{@weather_art.description} at #{@weather_art.temperature}°C.",
keywords: "#{@city.name}, #{@city.country.name}, ai art, ai weather, weather art, AI visualization, #{@weather_art.description}", keywords: "#{@city.name}, #{@city.country.name}, ai, ai web, ai art, ai weather, weather art, AI visualization, #{@weather_art.description}",
og: { og: {
image: @weather_art.image.attached? ? url_for(@weather_art.image) : nil image: @weather_art.image.attached? ? url_for(@weather_art.image) : nil
} }

View File

@ -11,7 +11,7 @@
og: { og: {
site_name: 'TodayAIWeather', site_name: 'TodayAIWeather',
type: 'website', type: 'website',
keywords: "ai art, ai weather, weather art, AI visualization, today ai weather", keywords: "ai, ai web, ai art, ai weather, weather art, AI visualization, today ai weather",
url: request.original_url url: request.original_url
}, },
alternate: { alternate: {