@jdevalk/astro-seo-graph 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -102,6 +102,18 @@ const {
|
|
|
102
102
|
const suggestionText = container.dataset.suggestionText ?? 'Did you mean';
|
|
103
103
|
|
|
104
104
|
const currentPath = window.location.pathname;
|
|
105
|
+
|
|
106
|
+
// Out-of-bounds pagination: /something/page/N/ → /something/
|
|
107
|
+
const paginationMatch = currentPath.match(/^(.+?)\/page\/\d+\/?$/);
|
|
108
|
+
if (paginationMatch) {
|
|
109
|
+
const basePath = paginationMatch[1]!.replace(/\/$/, '') + '/';
|
|
110
|
+
console.log(
|
|
111
|
+
`[FuzzyRedirect] Pagination redirect: "${currentPath}" → "${basePath}"`,
|
|
112
|
+
);
|
|
113
|
+
window.location.replace(basePath);
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
105
117
|
const urls = await fetchSitemapUrls(sitemapUrl);
|
|
106
118
|
|
|
107
119
|
// Extract paths from full URLs.
|
package/package.json
CHANGED