export interface TitleTemplateConfig {
    siteName: string;
    separator?: string;
    defaultTemplate?: string;
    collectionTemplates?: Record<string, string>;
}
export type TitleVariable = 'title' | 'siteName' | 'sep' | 'collection' | 'category' | 'tag' | 'page' | 'year' | 'month';
export declare function resolveTitle(template: string, variables: Partial<Record<TitleVariable, string>>): string;
/** Tokens supported by the site-wide title template. */
export declare const SITE_TITLE_TOKENS: readonly ["page", "site", "type", "separator", "author", "date", "category", "tag"];
export type SiteTitleToken = (typeof SITE_TITLE_TOKENS)[number];
/** Fallback used when no template is configured or the configured one is blank. */
export declare const DEFAULT_SITE_TITLE_TEMPLATE = "%page% \u2014 %site%";
export interface TitleTemplateValidation {
    valid: boolean;
    /** Tokens present in the template that aren't recognised. */
    unknownTokens: string[];
    /** Human-readable error messages (empty when valid). */
    errors: string[];
}
/**
 * Validate a site-wide title template. An empty/whitespace template is treated
 * as valid (the renderer falls back to {@link DEFAULT_SITE_TITLE_TEMPLATE}).
 * Unknown `%tokens%` and a template with no token *and* no literal text are
 * rejected.
 */
export declare function validateTitleTemplate(template: string): TitleTemplateValidation;
/**
 * Apply a site-wide title template. Unknown / empty tokens collapse cleanly so
 * the result never contains dangling separators or double spaces. Falls back to
 * {@link DEFAULT_SITE_TITLE_TEMPLATE} when the template is blank, and to the
 * page title (then site name) if the rendered result is empty.
 */
export declare function applySiteTitleTemplate(template: string | undefined, vars: Partial<Record<SiteTitleToken, string>>): string;
export declare function getDocumentTitle(config: TitleTemplateConfig, options: {
    title: string;
    collection?: string;
    metaTitle?: string;
    category?: string;
    tag?: string;
    page?: number;
}): string;
//# sourceMappingURL=title-templates.d.ts.map