refactor: Update sitemap configuration to support a new host name
- Modified the host name in the sitemap configuration to support the new domain. - This commit changes the hostname, and updates the sitemap to reflect the correct host. - This is done to reflect the correct host on the production server. - Added the new `public/sitemaps` directory to .gitignore to avoid commits related to this directory, and updates the .gitignore.
This commit is contained in:
parent
f02587da57
commit
31a2ec373d
1
.gitignore
vendored
1
.gitignore
vendored
@ -40,3 +40,4 @@
|
|||||||
.idea
|
.idea
|
||||||
|
|
||||||
public/sitemap.xml.gz
|
public/sitemap.xml.gz
|
||||||
|
public/sitemaps
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
# Set the host name for URL creation
|
# Set the host name for URL creation
|
||||||
host = Rails.env.production? ? "https://todayaiweather.com" : "http://127.0.0.1:3000"
|
# host = Rails.env.production? ? "https://todayaiweather.com" : "http://127.0.0.1:3000"
|
||||||
|
host = Rails.env.production? ? "https://pub.r2.todayaiweather.com" : "http://127.0.0.1:3000"
|
||||||
|
# host = "https://pub.r2.todayaiweather.com"
|
||||||
Rails.application.routes.default_url_options[:host] = host
|
Rails.application.routes.default_url_options[:host] = host
|
||||||
SitemapGenerator::Sitemap.adapter = SitemapGenerator::AwsSdkAdapter.new(
|
SitemapGenerator::Sitemap.adapter = SitemapGenerator::AwsSdkAdapter.new(
|
||||||
Rails.application.credentials.dig(:aws, :bucket),
|
Rails.application.credentials.dig(:aws, :bucket),
|
||||||
|
Loading…
Reference in New Issue
Block a user