FrontmatterPluginOptions
Updated 9 hr ago
Defined in: frontmatter.ts:62
Properties
coverPage?
optional coverPage?: boolean | CoverPageOptions
Defined in: frontmatter.ts:85
Automatically generate a cover page from frontmatter metadata.
infoBox?
optional infoBox?: boolean | InfoBoxOptions
Defined in: frontmatter.ts:90
Automatically generate a styled info-box / callout banner from frontmatter metadata.
parser?
optional parser?: FrontmatterParser
Defined in: frontmatter.ts:75
Custom parser function to parse the raw front-matter string. Enables full YAML 1.2 (e.g. via 'yaml') or full TOML (e.g. via 'smol-toml').
Example
import { parse as parseToml } from "smol-toml";
frontmatterPlugin(undefined, {
parser: (raw, type) => type === "toml" ? parseToml(raw) : parseFrontmatter(raw, type)
});transform?
optional transform?: (frontmatter, docxProps) => void
Defined in: frontmatter.ts:80
Custom transformer to map parsed front-matter fields to DOCX document properties.
Parameters
frontmatter
docxProps
IDocxProps
Returns
void