UNPKG

@stacksjs/stx

Version:

A performant UI Framework. Powered by Bun.

19 lines 827 B
import type { StxOptions } from './types'; /** * Read and parse a markdown file with frontmatter * @param filePath Path to the markdown file * @param options stx options * @returns Object containing parsed content and frontmatter data */ export declare function readMarkdownFile(filePath: string, options?: StxOptions): Promise<{ content: string, data: Record<string, any> }>; /** * Process @markdown-file directive * This directive includes markdown files in templates */ export declare function processMarkdownFileDirectives(template: string, context: Record<string, any>, filePath?: string, options?: StxOptions): Promise<string>; // Define a cache for markdown files to avoid repeated file reads export declare const markdownCache: Map<string, { content: string data: Record<string, any> updatedAt: number }>;