diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index cf3282d..4884968 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -25,4 +25,27 @@ module ApplicationHelper def current_user_is_admin? current_user&.admin? end + + def default_meta_tags + { + site: "TodayAIWeather", + title: "TodayAIWeather", + description: "Experience weather through artistic AI visualization. Daily updated weather art for cities worldwide.", + keywords: "AI weather art, weather visualization, city weather, artificial intelligence", + separator: "—".html_safe, + reverse: true, + og: { + site_name: "TodayAIWeather", + type: "website", + keywords: "ai, ai web, ai art, ai weather, weather art, AI visualization, today ai weather", + url: request.original_url + }, + alternate: { + "en" => url_for(locale: "en"), + "zh-CN" => url_for(locale: "zh-CN"), + "ja" => url_for(locale: "ja"), + "ko" => url_for(locale: "ko") + } + } + end end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 131a066..2945fef 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -5,22 +5,7 @@ - <%= display_meta_tags( - site: 'TodayAIWeather', - reverse: true, - og: { - site_name: 'TodayAIWeather', - type: 'website', - keywords: "ai, ai web, ai art, ai weather, weather art, AI visualization, today ai weather", - url: request.original_url - }, - alternate: { - "en" => url_for(locale: 'en'), - "zh-CN" => url_for(locale: 'zh-CN'), - "ja" => url_for(locale: 'ja'), - "ko" => url_for(locale: 'ko') - } - ) %> + <%= display_meta_tags(default_meta_tags) %> <%= csrf_meta_tags %> <%= csp_meta_tag %>