Skip to content
Auto
Products

MarkdownFrontMatter

Namespace: TagBites.Text.Markdown
Assembly: TagBites.Text.Markdown.dll
Product: TagBites.Text.Markdown v. 2.2.0

The metadata of a document, written above the content as a YAML front matter block.

public class MarkdownFrontMatter : System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<string, string>>, System.Collections.IEnumerable

Inheritance: object → MarkdownFrontMatter

Title and Description map to the entry named after them in lower case. The indexer holds an entry with a single value, and SetValues(string, string[]) holds one with a list, which is the shape a generator expects for tags or keywords. The block writes its entries in the order in which they were first set.

Creates a block without entries.

public MarkdownFrontMatter()

MarkdownFrontMatter(IEnumerable<KeyValuePair<string, string>>)

Section titled “MarkdownFrontMatter(IEnumerable<KeyValuePair<string, string>>)”

Creates a block from entries that were read from an existing document.

public MarkdownFrontMatter(IEnumerable<KeyValuePair<string, string>> entries)

A name that repeats builds a list, so the entries of another block come back unchanged.

Gets or sets the short description of the document.

public string Description { get; set; }

string

Gets or sets the title of the document.

public string Title { get; set; }

string

Gets or sets the single value of the entry with the given name. Setting null removes the entry.

public string Item[string name] { get; set; }

string

An entry that holds a list reads as null here. Use GetValues(string) for it.

Returns every value of the block, one pair per value.

public virtual IEnumerator<KeyValuePair<string, string>> GetEnumerator()

IEnumerator<KeyValuePair<string, string>>

An entry that holds a list comes back once per item, under the same name.

Returns the values of the entry with the given name, or null when it holds no list.

public IReadOnlyList<string> GetValues(string name)

IReadOnlyList<string>

An entry with a single value reads through the indexer.

Replaces the entry with the given name with a list, which is written as [first, second].

public MarkdownFrontMatter SetValues(string name, string[] values)

MarkdownFrontMatter

An empty list writes nothing, and null removes the entry.