import type { ComponentType } from "react"; import type { Author, Category } from "./types"; import type { BlogTelemetry } from "./telemetry"; import type { AtprotoFeedAdapter } from "./atproto-feed"; import type { BlogImageComponent, BlogImageSource } from "./context/image-context"; export interface BlogConfig { basePath: string; postsPerPage: number; feed: AtprotoFeedAdapter; categories: Record; defaultAuthor: Author; sequoia: { publicationUri: string; commentTheme?: Record; subscribeTheme?: Record; }; markdown?: { contentDirPath?: string }; coverImageMap?: Record; // Platform image component. Defaults to a thin `` wrapper; Next.js // consumers pass `nextImageAdapter` (from `@blog/next`) to get the // optimization/lazy-loading machinery. imageComponent?: BlogImageComponent; /** * Absolute origin used to build canonical URLs (e.g. `https://example.com`). * Optional — when absent, consumers fall back to relative URLs with Next's * `metadataBase`. */ siteOrigin?: string; telemetry?: BlogTelemetry; notFound?: ComponentType<{ msg?: { heading?: string; message: string } }>; } // Identity factory — exists for inference and a single canonical import site. export function createBlogConfig(input: BlogConfig): BlogConfig { return input; }