API Reference

Class

FrontMatterBlock

Namespace OfficeIMO.Markdown
Assembly OfficeIMO.Markdown
Implements
IFrontMatterMarkdownBlock IMarkdownBlock ISyntaxMarkdownBlock
Modifiers sealed

YAML front matter block rendered at the beginning of the document.

Inheritance

Usage

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Constructors

Methods

public Entry FindEntry(String key, StringComparison comparison = OrdinalIgnoreCase) #
Returns: Entry

Finds a front matter entry by key.

Parameters

key System.String requiredposition: 0
comparison System.StringComparison = OrdinalIgnoreCase optionalposition: 1
public static FrontMatterBlock FromObject(Object data) #
Returns: FrontMatterBlock

Creates front matter from an anonymous object or dictionary.

Parameters

data System.Object requiredposition: 0
public static FrontMatterBlock FromObject<T>(T data) #
Returns: FrontMatterBlock

Creates front matter from a typed object using public readable properties.

Type Parameters

T

Parameters

data ``0 requiredposition: 0
public Boolean HasEntry(String key, StringComparison comparison = OrdinalIgnoreCase) #
Returns: Boolean

Checks whether the front matter contains an entry with the specified key.

Parameters

key System.String requiredposition: 0
comparison System.StringComparison = OrdinalIgnoreCase optionalposition: 1
public String Render() #
Returns: String

Renders the front matter including '---' fences.

public Boolean TryGetValue<T>(String key, out T value) #
Returns: Boolean

Gets a typed front matter value by key when available.

Type Parameters

T

Parameters

key System.String requiredposition: 0
value ``0@ requiredposition: 1

Properties

public IReadOnlyList<Entry> Entries { get; } #

Structured front matter entries in insertion order.

public String RawYaml { get; set; } #

Raw YAML payload between the opening and closing front matter fences when parsed from markdown.

public Nullable<MarkdownSourceSpan> BodySourceSpan { get; set; } #

Source span for the raw YAML payload between the opening and closing front matter fences.