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 -2
View File
@@ -31,7 +31,7 @@ type BuildMetadataArgs = {
baseUrl?: string;
config: I18nConfig;
/** Home slug that collapses to the locale root. Defaults to 'home'. */
homeSlug?: string | Record<string, string>;
homeSlug?: Record<string, string> | string;
/** Resolved OG image URL (page image or site defaultShareImage). */
imageUrl?: null | string;
/** Current locale being rendered. */
@@ -63,6 +63,12 @@ type BuildMetadataArgs = {
query?: string;
/** Separator between page title and site name. Defaults to ' | '. */
separator?: string;
/**
* Global fallback description (from SiteSettings.siteDescription). Used when a
* page has no meta.description — better than emitting no description at all
* (Google would then scrape random on-page text for the snippet).
*/
siteDescription?: null | string;
/** Site name for title composition and OG. */
siteName?: null | string;
/** slug per locale for this document — drives canonical + hreflang. */
@@ -77,5 +83,5 @@ type BuildMetadataArgs = {
* pieces (meta group, site name, image URL, localized slugs) and passes them
* in — the plugin composes, it doesn't fetch.
*/
export declare function buildMetadata({ baseUrl, config, homeSlug, imageUrl, locale, meta, order, pageTitle, prefix, query, separator, siteName, slugs, }: BuildMetadataArgs): PageMetadata;
export declare function buildMetadata({ baseUrl, config, homeSlug, imageUrl, locale, meta, order, pageTitle, prefix, query, separator, siteDescription, siteName, slugs, }: BuildMetadataArgs): PageMetadata;
export {};