Interface Options

Options for npf2html.

interface Options {
    askingAvatar?: VisualMedia[];
    layout?: Layout[];
    prefix?: string;
    renderer?: Renderer;
}

Properties

askingAvatar?: VisualMedia[]

The VisualMedia to use for the asker's avatar if the post being rendered is an ask.

This is available from post.asking_avatar in the Tumblr API.

layout?: Layout[]

The layouts describing how to group different content blocks.

This is available from post.layout in the Tumblr API.

prefix?: string

The prefix to use for class names used to disambiguate block types and subtypes that don't map cleanly to HTML tags. Defaults to "npf".

This is also used for CSS variables to convey additional style information about the blocks.

renderer?: Renderer

A custom Renderer to use to convert NPF components to HTML.

If this is passed, prefix and askingAvatar are ignored in favor of the corresponding values in renderer.