Big news!Introducing Socket AI - ChatGPT-Powered Threat Analysis. Learn more →
Socket
Log inDemoInstall

remarkable-admonitions

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Issues
File Explorer

Advanced tools

remarkable-admonitions

A remarkable plugin to add admonitions support

    0.2.2latest
    GitHub

Version published
Maintainers
1
Weekly downloads
367
decreased by-25.86%

Weekly downloads

Changelog

Source

0.2.2 (2020-01-14)

🐛 Bug Fixes

  • Parse admonitions within lists (5d70c74), closes #26

📚 Documentation

  • Add example for custom title and types (21b22f3)

Readme

Source

remarkable-admonitions

Travis (.com) Codecov npm

Adds admonitions parsing support to Remarkable. (There's also a React component)

Installation

With npm:

npm install --save remarkable-admonitions

or with Yarn:

yarn add remarkable-admonitions

Usage

import Remarkable from 'remarkable'; const md = new Remarkable(); import admonitions from 'remarkable-admonitions'; md.use(admonitions()); 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> */

Supported admonition types are: caution, note, important, tip, warning.

By default block title is the admonition type. You can provide a custom title after the opening tag:

:::note This is my custom title A note. :::

With Docusaurus

If you are using Docusaurus, you can load the plugin in siteConfig.js:

const siteConfig = { // ... markdownPlugins: [ // Highlight admonitions. require('remarkable-admonitions')({ icon: 'svg-inline' }) ] };

There is a style developed to match its visual appearence (the same you can see in the preview image up here). Due to Docusaurus CSS loading system, you need to download the css from docusaurus-admonitions.css and place it into your custom/ folder.

Options

You may configure this plugin with the following options:

OptionDefaultDescription
iconemojiAllows to use a different method to render admonition icons. By default it uses emoji (unicode Emojis). Choose svg-inline to use Octicons.

Keywords

FAQs

Last updated on 14 Jan 2020

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc