Skip to content

Commit b5482ce

Browse files
authored
Fix: remove odd /1/ check on RSS canonicals (#6970)
* fix: remove odd `/1/` check on RSS canonicals * chore: changeset
1 parent b6797fc commit b5482ce

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.changeset/flat-peas-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@astrojs/rss": patch
3+
---
4+
5+
Fix: remove accidental stripping of trailing `/1/` on canonical URLs

packages/astro-rss/src/util.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export function createCanonicalURL(
88
base?: string
99
): URL {
1010
let pathname = url.replace(/\/index.html$/, ''); // index.html is not canonical
11-
pathname = pathname.replace(/\/1\/?$/, ''); // neither is a trailing /1/ (impl. detail of collections)
1211
if (trailingSlash === false) {
1312
// remove the trailing slash
1413
pathname = pathname.replace(/(\/+)?$/, '');

0 commit comments

Comments
 (0)