Something went wrong. Try again.
React blog kit backed by AT Protocol. Provides filtering UI, pagination, Bluesky comments/embeds, subscribe widget, and markdown rendering.
Something went wrong. Try again.
1.4 kB · 37 lines
TypeScript
at main
1234567891011121314151617181920212223242526272829303132333435363738import 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<string, Category>; defaultAuthor: Author; sequoia: { publicationUri: string; commentTheme?: Record<string, string>; subscribeTheme?: Record<string, string>; }; markdown?: { contentDirPath?: string }; coverImageMap?: Record<string, BlogImageSource>; // Platform image component. Defaults to a thin `<img>` 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;}