interface GreyMatterBase<I> {
    content: string;
    data: {
        [key: string]: any;
    };
    empty: string;
    excerpt?: string;
    isEmpty: boolean;
    language: string;
    matter: string;
    orig: Buffer | I;
    stringify(lang): string;
}

Type Parameters

  • I

Properties

content: string

The input string, with matter stripped

data: {
    [key: string]: any;
}

The object created by parsing front-matter

Type declaration

  • [key: string]: any
empty: string
excerpt?: string

An excerpt of the post

isEmpty: boolean
language: string

The front-matter language that was parsed. YAML is the default

matter: string

The raw, un-parsed front-matter string

orig: Buffer | I

The original input string (or buffer)

Methods

  • Stringify the file by converting file.data to a string in the given language, wrapping it in delimiters and prepending it to file.content

    Parameters

    • lang: string

    Returns string