markdown/directives/directives

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:
Name Type Description
headingDivider Directive

Specify heading divider option.

style Directive

Specify the CSS style to apply additionally.

theme Directive

Specify theme of the slide deck.

Source:

(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:
Name Type Description
backgroundColor Directive

Specify background-color style.

backgroundImage Directive

Specify background-image style.

backgroundPosition Directive

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

backgroundRepeat Directive

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

backgroundSize Directive

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

class Directive

Specify HTML class of section element(s).

color Directive

Specify color style (base text color).

footer Directive

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

header Directive

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

paginate Directive

Show page number on the slide if you set true.

Source:

Type Definitions

Directive(value, marpit) → {Object}

Source:
Parameters:
Name Type Description
value string

Parsed value.

marpit Marpit

Marpit instance.

Returns:
Type:
Object

Assigning object to token meta.