x-default was empty on the homepage, and /donate was not listed #178

Merged
paulhitt merged 2 commits from seo/hreflang-and-sitemap into main 2026-09-09 20:45:11 +00:00
+5 -1
View File
@@ -435,6 +435,10 @@ func register(routes r: Routes, on app: Application) throws {
hasAlternate: spanishLanding,
altLang: spanishLanding ? "es" : "",
altHref: spanishLanding ? publicOrigin(req) + "/es/" : "",
// English is x-default, the same as every other page. Setting
// hasAlternate without this renders href="" on the one URL
// that matters most.
defaultHref: spanishLanding ? publicOrigin(req) + "/" : "",
iosLive: r.config.iosLive,
canonical: publicOrigin(req) + "/",
origin: publicOrigin(req),
@@ -687,7 +691,7 @@ func register(routes r: Routes, on app: Application) throws {
}
// Served by something other than the page table, so they are named here
// rather than silently missing.
for slug in ["releases", "status"] {
for slug in ["releases", "status", "donate"] {
body += "<url><loc>\(origin)/\(slug)</loc></url>\n"
}
// Translated pages are listed too, or the only way to reach the Spanish