Initial commit
This commit is contained in:
commit
3f501820b1
173 changed files with 24001 additions and 0 deletions
14
quartz/plugins/vfile.ts
Executable file
14
quartz/plugins/vfile.ts
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
import { Root as HtmlRoot } from "hast"
|
||||
import { Root as MdRoot } from "mdast"
|
||||
import { Data, VFile } from "vfile"
|
||||
|
||||
export type QuartzPluginData = Data
|
||||
export type MarkdownContent = [MdRoot, VFile]
|
||||
export type ProcessedContent = [HtmlRoot, VFile]
|
||||
|
||||
export function defaultProcessedContent(vfileData: Partial<QuartzPluginData>): ProcessedContent {
|
||||
const root: HtmlRoot = { type: "root", children: [] }
|
||||
const vfile = new VFile("")
|
||||
vfile.data = vfileData
|
||||
return [root, vfile]
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue