UNPKG

@analogjs/platform

Version:

The fullstack meta-framework for Angular

23 lines (22 loc) 1.13 kB
import type { Plugin } from 'vite'; import type { WithShikiHighlighterOptions } from './content/shiki/options.js'; import type { WithPrismHighlighterOptions } from './content/prism/options.js'; import type { WithMarkedOptions } from './content/marked/index.js'; import type { Options } from './options.js'; export type ContentPluginOptions = { highlighter?: 'shiki' | 'prism'; markedOptions?: WithMarkedOptions; shikiOptions?: WithShikiHighlighterOptions; prismOptions?: WithPrismHighlighterOptions; }; /** * Content plugin that provides markdown and content file processing for Analog. * * IMPORTANT: This plugin uses tinyglobby for file discovery. * Key pitfall with { dot: true }: * - Returns relative paths from cwd (e.g., "apps/blog-app/src/content/...") * - These paths CANNOT be used directly in ES module imports * - Relative paths without ./ or ../ are treated as package names * - Must convert to absolute paths for imports to work correctly */ export declare function contentPlugin({ highlighter, markedOptions, shikiOptions, prismOptions, }?: ContentPluginOptions, options?: Options): Plugin[];