SEO: multilingual homepage (homeSlug per locale in path/sitemap), Article + llms.txt generators, siteDescription fallback, composeTitle dedup

This commit is contained in:
2026-09-15 15:31:08 +02:00
parent 87d575f335
commit 33ae035adc
25 changed files with 398 additions and 61 deletions
+8 -6
View File
@@ -1,10 +1,6 @@
import type { BasePayload } from 'payload';
import type { TitleOrder } from './composeTitle.js';
export type SiteMetaConfig = {
siteName: string | null;
/** Padded separator, e.g. ' | ' — the panel stores the bare character. */
separator?: string;
order?: TitleOrder;
/**
* Home slug per locale, e.g. { pl: 'strona-glowna', de: 'startseite' }. A map
* (not a single string) so multilingual homepages collapse to root in EVERY
@@ -12,6 +8,12 @@ export type SiteMetaConfig = {
* instead of '/de', breaking return tags (a real GSC error).
*/
homeSlug?: Record<string, string>;
order?: TitleOrder;
/** Padded separator, e.g. ' | ' — the panel stores the bare character. */
separator?: string;
/** Global fallback meta description. */
siteDescription?: null | string;
siteName: null | string;
};
/**
* Reads the site-wide inputs to title and URL composition from SiteSettings.
@@ -21,9 +23,9 @@ export type SiteMetaConfig = {
* that the separator arrives unpadded, or that the home slug hides inside a
* relationship — it should receive a resolved config.
*/
export declare function readSiteMetaConfig({ payload, locale, settingsSlug, siteNameField, }: {
payload: BasePayload;
export declare function readSiteMetaConfig({ locale, payload, settingsSlug, siteNameField, }: {
locale: string;
payload: BasePayload;
settingsSlug?: string;
siteNameField?: string;
}): Promise<SiteMetaConfig>;