Skip to content

Function: createMdFrontmatterBuilder() ​

ts
function createMdFrontmatterBuilder<T>(pathOrGlob, kind?): MdFrontmatterSourceBuilder<T>;

Defined in: markdown/src/builders/create-md-frontmatter-builder.ts:17

Builds a MdFrontmatterSourceBuilder<T> for md.frontmatter(pathOrGlob).

Sets id: "md:${kind}:${pathOrGlob}" and kind on the passive MarkdownFrontmatterSourceNode<T> so executeMarkdownFrontmatterSource dispatches deterministically.

Type Parameters ​

Type ParameterDefault typeDescription
TunknownResolved frontmatter payload type.

Parameters ​

ParameterTypeDefault valueDescription
pathOrGlobstringundefinedHost-root-relative file path or glob pattern.
kind?NonNullable< | "global-rules" | "scoped-rule" | "scoped-rules" | "skill" | "skills" | "frontmatter" | undefined>'frontmatter'Optional loader kind discriminant ('frontmatter' default).

Returns ​

MdFrontmatterSourceBuilder<T>

Frozen MdFrontmatterSourceBuilder<T> instance.

Released under the MIT License.