The definition of Marpit directives

Members

(static, constant) globals

Global directives.

Each global directive assigns to the whole slide deck. If you wrote a same directive many times, Marpit only recognizes the last value.

Properties
NameTypeDescription
headingDividerDirective

Specify heading divider option.

styleDirective

Specify the CSS style to apply additionally.

themeDirective

Specify theme of the slide deck.

langDirective

Specify the language of the slide deck. It will assign as lang attribute for each slide.

(static, constant) locals

Local directives.

Mainly these are used to change settings each slide page. By default, a local directive applies to the defined page and followed pages.

If you want to set a local directive to single page only, you can add the prefix _ (underbar) to directive name. (Spot directives)

Properties
NameTypeDescription
backgroundColorDirective

Specify background-color style.

backgroundImageDirective

Specify background-image style.

backgroundPositionDirective

Specify background-position style. The default value while setting backgroundImage is center.

backgroundRepeatDirective

Specify background-repeat style. The default value while setting backgroundImage is no-repeat.

backgroundSizeDirective

Specify background-size style. The default value while setting backgroundImage is cover.

classDirective

Specify HTML class of section element(s).

colorDirective

Specify color style (base text color).

footerDirective

Specify the content of slide footer. It will insert a <footer> element to the last of each slide contents.

headerDirective

Specify the content of slide header. It will insert a <header> element to the first of each slide contents.

paginateDirective

Show page number on the slide if you set true. hold and skip are also available to disable increment of the page number.

Type Definitions

Directive(value, marpit) → {Object}

Parameters:
NameTypeDescription
valuestring

Parsed value.

marpitMarpit

Marpit instance.

Returns:

Assigning object to token meta.

Type: 
Object