/** * Blog Post Content Type * * Represents a blog post with title, excerpt, cover image, * and structured content blocks. */ import { ArticleMetadata } from '../../../components/organisms/article/types'; import { ContentDocument, ContentConfig } from '../types'; /** * Blog post document interface */ export interface BlogPost extends ContentDocument<'blog'> { /** Blog post title */ title: string; /** Short excerpt/summary for listings */ excerpt: string; /** Cover image URL */ coverImage?: string; /** Estimated reading time in minutes */ readingTime?: number; /** Featured post flag */ featured?: boolean; } /** * BlogPostBuilder provides a fluent API for creating blog posts. * * @example * ```typescript * const post = new BlogPostBuilder() * .title('My First Post') * .excerpt('A brief introduction...') * .author('John Doe', '/avatars/john.jpg') * .coverImage('/images/post-cover.jpg') * .heading('Introduction') * .paragraph('Welcome to my blog...') * .build(); * * // Convert to ArticleMetadata * const article = post.toArticle(); * ``` */ export declare class BlogPostBuilder { private post; /** * Sets the blog post title */ title(title: string): this; /** * Sets the blog post excerpt */ excerpt(excerpt: string): this; /** * Sets the cover image URL */ coverImage(url: string): this; /** * Marks the post as featured */ featured(value?: boolean): this; /** * Sets the post author */ author(name: string, avatar?: string, role?: string): this; /** * Sets the publication date */ publishedAt(date: Date | string): this; /** * Sets tags for the post */ tags(...tags: string[]): this; /** * Sets the category */ category(category: string): this; /** * Sets the slug */ slug(slug: string): this; /** * Sets the ID */ id(id: string): this; /** * Adds a heading block */ heading(text: string, level?: 1 | 2 | 3): this; /** * Adds a paragraph block */ paragraph(text: string, emphasis?: boolean): this; /** * Adds a quote block */ quote(text: string, author?: string, source?: string): this; /** * Adds a code block */ code(code: string, language?: string): this; /** * Adds an unordered list */ list(items: string[]): this; /** * Adds an ordered/numbered list */ orderedList(items: string[]): this; /** * Adds a checklist */ checklist(items: string[]): this; /** * Adds an image block */ image(src: string, alt: string, caption?: string): this; /** * Adds a callout/note block */ callout(text: string, variant?: 'info' | 'warning' | 'success' | 'error', title?: string): this; /** * Adds a divider */ divider(style?: 'line' | 'dots' | 'space'): this; /** * Adds a button/CTA */ button(text: string, href?: string, color?: 'primary' | 'secondary' | 'success'): this; /** * Configures rendering options */ config(config: Partial): this; /** * Builds the final BlogPost object */ build(): BlogPost; /** * Builds and converts to ArticleMetadata */ toArticle(): ArticleMetadata; /** * Resets the builder for reuse */ clear(): this; } /** * Creates a new BlogPostBuilder instance */ export declare function blogPost(): BlogPostBuilder;