Compare commits

...
2 Commits
Author SHA1 Message Date
radoslaw.smolinski 87d575f335 1.2.6 2026-09-09 22:21:09 +02:00
radoslaw.smolinski e4329f76b1 Fixed buildSitemapEntries.ts 2026-09-09 22:21:04 +02:00
4 changed files with 19 additions and 4 deletions
+7 -1
View File
@@ -110,7 +110,13 @@ import { buildHreflangAlternates } from './hreflang.js';
depth: 1,
locale: 'all'
});
const resolvedHomeSlug = homeSlug ?? extractSlugInLocale(settings.homepage, defaultLocale) ?? 'home';
// Home slug as a per-locale MAP so every language's homepage collapses to its
// root in the sitemap (/pl, /de, /en) — not just the default locale. Priority:
// caller-provided homeSlug > full map from the homepage relationship > single
// default-locale slug > 'home'. slugMapAllLocales already builds the map (it's
// used for archive prefixes below); reusing it here fixes /de/startseite
// appearing in the sitemap instead of /de.
const resolvedHomeSlug = homeSlug ?? slugMapAllLocales(settings.homepage, locales) ?? extractSlugInLocale(settings.homepage, defaultLocale) ?? 'home';
// Which collections to walk: pages (no prefix) + each content collection with
// its archive-page slugs as the localized prefix.
const collections = [
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@intecion/ipal-kit",
"version": "1.2.5",
"version": "1.2.6",
"description": "Intecion Payload Advanced Library — a Payload CMS 3 plugin: i18n, SEO, forms, consent, analytics, blog/archives.",
"license": "MIT",
"repository": {
+10 -1
View File
@@ -159,8 +159,17 @@ export async function buildSitemapEntries({
locale: 'all' as never,
})) as Record<string, unknown>
// Home slug as a per-locale MAP so every language's homepage collapses to its
// root in the sitemap (/pl, /de, /en) — not just the default locale. Priority:
// caller-provided homeSlug > full map from the homepage relationship > single
// default-locale slug > 'home'. slugMapAllLocales already builds the map (it's
// used for archive prefixes below); reusing it here fixes /de/startseite
// appearing in the sitemap instead of /de.
const resolvedHomeSlug =
homeSlug ?? extractSlugInLocale(settings.homepage, defaultLocale) ?? 'home'
homeSlug ??
slugMapAllLocales(settings.homepage, locales) ??
extractSlugInLocale(settings.homepage, defaultLocale) ??
'home'
// Which collections to walk: pages (no prefix) + each content collection with
// its archive-page slugs as the localized prefix.