added /dist

This commit is contained in:
2026-08-03 12:24:28 +02:00
parent dd97bb67fe
commit 05150e7ece
490 changed files with 6667 additions and 0 deletions
+20
View File
@@ -0,0 +1,20 @@
/** Which part comes first in a composed title. */ /**
* Composes a full document title from a page title and the site name.
*
* - both, page-first: "About Us | Acme Inc"
* - both, site-first: "Acme Inc | About Us"
* - page only: "About Us"
* - site only: "Acme Inc"
* - neither: ""
*
* Pure function — no dependency on Payload or request state.
*/ export function composeTitle({ order = 'page-first', pageTitle, separator = ' | ', siteName }) {
const page = pageTitle?.trim();
const site = siteName?.trim();
if (page && site) {
return order === 'site-first' ? `${site}${separator}${page}` : `${page}${separator}${site}`;
}
return page || site || '';
}
//# sourceMappingURL=composeTitle.js.map