Fixed support for multi-langual slugs
This commit is contained in:
+11
-6
@@ -1,12 +1,17 @@
|
||||
import type { BasePayload } from 'payload';
|
||||
import type { TitleOrder } from './composeTitle.js';
|
||||
export type SiteMetaConfig = {
|
||||
/** Slug of the page assigned as Homepage; collapses to the locale root. */
|
||||
homeSlug?: string;
|
||||
order?: TitleOrder;
|
||||
siteName: string | null;
|
||||
/** Padded separator, e.g. ' | ' — the panel stores the bare character. */
|
||||
separator?: string;
|
||||
siteName: null | 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.
|
||||
@@ -16,9 +21,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({ locale, payload, settingsSlug, siteNameField, }: {
|
||||
locale: string;
|
||||
export declare function readSiteMetaConfig({ payload, locale, settingsSlug, siteNameField, }: {
|
||||
payload: BasePayload;
|
||||
locale: string;
|
||||
settingsSlug?: string;
|
||||
siteNameField?: string;
|
||||
}): Promise<SiteMetaConfig>;
|
||||
|
||||
Reference in New Issue
Block a user