songtianlun
a0516f731c
- Introduced `SeoConcern` module to handle SEO meta tags - Integrated `meta-tags` gem for customizable meta tags - Created `RefreshSitemapWorker` to automate sitemap updates - Added relevant meta tags in controllers for weather art and cities - Configured sitemap generation settings These changes improve the SEO of the application by ensuring that pages have appropriate meta tags. Additionally, a sitemap is now generated and refreshed daily, enhancing site visibility to search engines.
13 lines
345 B
Ruby
13 lines
345 B
Ruby
class ApplicationController < ActionController::Base
|
|
include SeoConcern
|
|
# Only allow modern browsers supporting webp images, web push, badges, import maps, CSS nesting, and CSS :has.
|
|
allow_browser versions: :modern
|
|
before_action :set_locale
|
|
|
|
private
|
|
|
|
def set_locale
|
|
I18n.locale = params[:locale] || I18n.default_locale
|
|
end
|
|
end
|