Skip to content

Commit

Permalink
📚 Add examples, images and options
Browse files Browse the repository at this point in the history
  • Loading branch information
leonardfactory committed Mar 13, 2019
1 parent 1af4f14 commit 0cd047d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
28 changes: 27 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

Adds admonitions parsing support to Remarkable

<img src="assets/preview.png" width="680" />

## Installation

With npm:
Expand All @@ -27,5 +29,29 @@ import Remarkable from 'remarkable';
const md = new Remarkable();

import admonitions from 'remarkable-admonitions';
md.use(admonitions);
md.use(admonitions({ icon: 'emoji' }));

md.render(`
:::caution
Beware Ogre
:::
`);
/* ->
<div class="admonition admonition-caution">
<div class="admonition-heading">
<h5><div class="admonition-icon">🔥</div> caution</h5>
</div>
<div class="admonition-content">
<p>Beware Ogre</p>
</div>
</div>
*/
```

## Options

You may configure this plugin with the following options:

| Option | Default | Description |
| ---------- | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **`icon`** | `svg-inline` | Allows to use a different method to render admonition icons. By default it uses `svg-inline` with [Octicons](https://octicons.github.com) icons. Choose `emoji` to use Emojis instead. |
Binary file added assets/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0cd047d

Please sign in to comment.