markdown it details - uhop/grunt-slice-markdown GitHub Wiki

markdown-it details

Options

If options are supplied as markdownItOptions object, it is used as is (see markdown-it to learn details). Otherwise, a following default object is used:

{
  html: true,
  typographer: true
}

List of used plugins

Following markdown-it plugins are included with default parameters:

How to add CSS classes

It is very important to style a presentation just so, and when using HTML, the only proper way to style text is to use CSS. Unfortunately a vanilla Markdown doesn't provide this capability. grunt-slice-markdown includes markdown-it-container configured to support a following syntax:

# Example

::: class: my-red
This is *red* paragraph.
:::

::: class: right big
This paragraph is **right-aligned** and uses **big** font.
:::

It may produce a following output:

<h1>Example</h1>

<div class="my-red">
This is <em>red</em> paragraph.
</div>

<div class="right big">
This paragraph is <strong>right-aligned</strong> and
uses <strong>big</strong> font.
</div>

It is up to user to define such classes in their CSS file. Anything after class: is not verified, but placed in class attribute as is.

⚠️ **GitHub.com Fallback** ⚠️