From 0647a5e100450b73a0ef927389943028b4d8fd35 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Charrier?= Date: Wed, 28 Jan 2026 15:06:09 +0100 Subject: [PATCH] Move sitemap.xml to docs/sitemap.xml This will allow us to serve multiple sitemaps from our root bump.sh domain. --- config/initializers.rb | 12 +++++++++++- src/_redirects | 5 ++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/config/initializers.rb b/config/initializers.rb index 566ef91a..40aa0202 100644 --- a/config/initializers.rb +++ b/config/initializers.rb @@ -40,7 +40,7 @@ # For more documentation on how to configure your site using this initializers file, # visit: https://edge.bridgetownrb.com/docs/configuration/initializers/ - init :"bridgetown-lit-renderer" + init :"bridgetown-lit-renderer" init :"bridgetown-quick-search" init :"bridgetown-seo-tag" init :"bridgetown-sitemap" @@ -48,4 +48,14 @@ init :bridgetown_internal_markdown_links config.internal_markdown_links.collections = ["pages", "help", "guides", "product-updates"] + + + # Move sitemap.xml to /docs/sitemap.xml after build + hook :site, :post_write do |site| + source = site.in_dest_dir("sitemap.xml") + dest = site.in_dest_dir("docs", "sitemap.xml") + if File.exist?(source) + FileUtils.mv(source, dest) + end + end end diff --git a/src/_redirects b/src/_redirects index 4719276e..99c71335 100644 --- a/src/_redirects +++ b/src/_redirects @@ -33,4 +33,7 @@ https://help.bump.sh/custom-domains /help/customization-options/custom-domains/ /help/account/billing/ /help/organizations/billing/ # Cribbed for the OpenAPI Specification Tutorial -/guides/openapi/advanced-ref-usage/ /guides/openapi/specification/v3.1/advanced/splitting-documents-with-ref/ \ No newline at end of file +/guides/openapi/advanced-ref-usage/ /guides/openapi/specification/v3.1/advanced/splitting-documents-with-ref/ + +# Migration from docs.bump.sh to bump.sh +/sitemap.xml /docs/sitemap.xml