Fixed support for multi-langual slugs

This commit is contained in:
2026-09-09 09:56:47 +02:00
parent db2ac80a1e
commit 2ecfc2e12d
41 changed files with 646 additions and 212 deletions
+6 -6
View File
@@ -1,14 +1,14 @@
/** Which part comes first in a composed title. */
export type TitleOrder = 'page-first' | 'site-first';
type ComposeTitleArgs = {
/** Defaults to 'page-first' — the page title is what a visitor scans for. */
order?: TitleOrder;
/** Page-specific title, e.g. 'About Us'. */
pageTitle?: null | string;
pageTitle?: string | null;
/** Site name, e.g. 'Acme Inc'. */
siteName?: string | null;
/** Separator between page title and site name. Defaults to ' | '. */
separator?: string;
/** Site name, e.g. 'Acme Inc'. */
siteName?: null | string;
/** Defaults to 'page-first' — the page title is what a visitor scans for. */
order?: TitleOrder;
};
/**
* Composes a full document title from a page title and the site name.
@@ -21,5 +21,5 @@ type ComposeTitleArgs = {
*
* Pure function — no dependency on Payload or request state.
*/
export declare function composeTitle({ order, pageTitle, separator, siteName, }: ComposeTitleArgs): string;
export declare function composeTitle({ pageTitle, siteName, separator, order, }: ComposeTitleArgs): string;
export {};