UNPKG

@asafarim/simple-md-viewer

Version:

A professional markdown viewer with file tree navigation, directory content browsing, and advanced YAML front matter support

43 lines (42 loc) 1.22 kB
export interface FrontMatter { title?: string; description?: string; author?: string; date?: string; lastModified?: string; version?: string; category?: string; section?: string; order?: number; tags?: string[]; keywords?: string[]; toc?: boolean; sidebar?: boolean; locale?: string; breadcrumbs?: Array<{ name: string; path: string; }>; related?: Array<{ title: string; path: string; }>; [key: string]: any; } export interface ParsedMarkdown { frontMatter: FrontMatter | null; content: string; } /** * Parses markdown content and extracts YAML front matter * @param markdown - Raw markdown content with potential front matter * @returns Object containing parsed front matter and clean content */ export declare function parseFrontMatter(markdown: string): ParsedMarkdown; /** * Formats a date string for display * @param dateString - ISO date string or other date format * @param locale - Locale for formatting (defaults to 'en-US', supports 'nl-BE', 'fr-BE' for Belgian formats) * @returns Formatted date string */ export declare function formatDate(dateString: string, locale?: string): string;