import { type EponymeSeoDefinition, type EponymeSeoValue } from '../fields/seo.js'; import type { EponymeImageValue } from '../types/field.js'; export interface EponymeSeoHeadOptions { /** Used when the entry has no SEO title, typically the entry's own title. */ title?: string; /** Used when the entry has no SEO description, an excerpt for instance. */ description?: string; /** * Used when the entry has no sharing image, a cover for instance: a `field.image()` value, whose text * alternative and size are shared along, or a bare URL. */ image?: EponymeImageValue | string | null; /** * Applied to the page title, not to the sharing title. `%s` stands for the title. Defaults to * `%s ยท ` when a site name is known, and to the bare title otherwise. */ titleTemplate?: string | ((title: string) => string); /** Overrides the one `field.seo({ siteName })` declares. */ siteName?: string; /** Origin that relative canonical and image URLs are resolved against: `https://example.com`. */ siteUrl?: string; /** Path of the current page, the canonical URL when the entry names none. */ path?: string; /** `false` emits no canonical link unless the entry names one. @default true */ canonical?: boolean; /** Carries `siteName` and `themeColor`. */ definition?: Pick; } /** Everything `useSeoMeta` and a canonical link need, already resolved. */ export interface EponymeSeoHead { title?: string; description?: string; ogTitle?: string; ogDescription?: string; ogImage?: string; ogImageAlt?: string; ogImageWidth?: number; ogImageHeight?: number; ogUrl?: string; ogSiteName?: string; ogType: 'website'; twitterCard?: 'summary' | 'summary_large_image'; robots?: string; themeColor?: string; canonical?: string; } /** Resolves a URL against the site's origin. An absolute URL, or any URL without a known origin, is kept. */ export declare function toEponymeAbsoluteUrl(url: string | undefined, siteUrl: string | undefined): string | undefined; /** * The head of a page from its `field.seo()` value, with fallbacks for whatever the author left empty. * Pure, so it can be used outside `useEponymeSeo` - a server route rendering its own HTML, a test. */ export declare function buildEponymeSeoHead(value: EponymeSeoValue | null | undefined, options?: EponymeSeoHeadOptions): EponymeSeoHead;