Files
ipal-kit/dist/modules/seo/readSiteMetaConfig.d.ts
T

30 lines
1.2 KiB
TypeScript

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
* language — otherwise hreflang points other languages at '/de/startseite'
* instead of '/de', breaking return tags (a real GSC error).
*/
homeSlug?: Record<string, string>;
};
/**
* Reads the site-wide inputs to title and URL composition from SiteSettings.
*
* Split out of metadata assembly because these are one concern with one source:
* whatever an editor set in the panel. Metadata generation shouldn't also know
* 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;
locale: string;
settingsSlug?: string;
siteNameField?: string;
}): Promise<SiteMetaConfig>;