List /tarballz/ in the sitemap with its trailing slash
Build & Deploy / deploy (push) Successful in 3m9s
Build & Deploy / deploy (push) Successful in 3m9s
The slash stripping meant for Astro's routes also turned the tarball index into /tarballz, which the web host answers with a 301 to /tarballz/. A sitemap should only list the final URL. Claude-Session: https://claude.ai/code/session_01GGe7kUhooMFuzY6GaDb2w9
This commit is contained in:
+3
-1
@@ -161,7 +161,9 @@ export default defineConfig({
|
||||
// Samme kanoniske form som <link rel="canonical"> og de interne links:
|
||||
// uden afsluttende skråstreg. Slås lastmod op FØR strippet, fordi
|
||||
// lastmodByRoute er nøglet på Astros egne ruter (som har skråstregen).
|
||||
if (pathname !== '/') item.url = item.url.replace(/\/$/, '');
|
||||
// Undtagen /tarballz/: den er ikke en Astro-side, og webhosten serverer
|
||||
// den kun med skråstreg (uden skråstreg giver den en 301).
|
||||
if (pathname !== '/' && pathname !== '/tarballz/') item.url = item.url.replace(/\/$/, '');
|
||||
return item;
|
||||
},
|
||||
}),
|
||||
|
||||
Reference in New Issue
Block a user