Skip to content

Function: createMdSectionBuilder() ​

ts
function createMdSectionBuilder<T>(path, heading): MdSectionSourceBuilder<T>;

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

Builds a MdSectionSourceBuilder<T> for md.section(path, heading).

Sets id: "md:section:${path}#${heading}" and compiles to a passive MarkdownSectionSourceNode<T> extracting the content under heading up to the next heading of equal or higher depth.

Type Parameters ​

Type ParameterDefault typeDescription
TstringResolved section content type.

Parameters ​

ParameterTypeDescription
pathstringHost-root-relative path to the Markdown document.
headingstringTarget Markdown heading title to extract.

Returns ​

MdSectionSourceBuilder<T>

Frozen MdSectionSourceBuilder<T> instance.

Released under the MIT License.