Compare commits
2
Commits
fa4cf20022
..
v1.2.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87d575f335 | ||
|
|
e4329f76b1 |
+7
-1
@@ -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 = [
|
||||
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -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": {
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user