2025-01-07 22:33:34 +02:00
|
|
|
import { Root as HtmlRoot } from "hast"
|
|
|
|
import { Root as MdRoot } from "mdast"
|
2023-07-22 17:27:41 -07:00
|
|
|
import { Data, VFile } from "vfile"
|
2023-05-30 08:02:20 -07:00
|
|
|
|
|
|
|
export type QuartzPluginData = Data
|
2025-01-07 22:33:34 +02:00
|
|
|
export type MarkdownContent = [MdRoot, VFile]
|
|
|
|
export type ProcessedContent = [HtmlRoot, VFile]
|
2023-07-01 00:03:01 -07:00
|
|
|
|
|
|
|
export function defaultProcessedContent(vfileData: Partial<QuartzPluginData>): ProcessedContent {
|
2025-01-07 22:33:34 +02:00
|
|
|
const root: HtmlRoot = { type: "root", children: [] }
|
2023-07-01 00:03:01 -07:00
|
|
|
const vfile = new VFile("")
|
|
|
|
vfile.data = vfileData
|
|
|
|
return [root, vfile]
|
|
|
|
}
|