Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nunof07/markdown-it-alerts
Markdown-it plugin to create Bootstrap alerts
https://github.com/nunof07/markdown-it-alerts
bootstrap markdown markdown-it
Last synced: 9 days ago
JSON representation
Markdown-it plugin to create Bootstrap alerts
- Host: GitHub
- URL: https://github.com/nunof07/markdown-it-alerts
- Owner: nunof07
- License: mit
- Created: 2015-12-02T11:36:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T14:33:42.000Z (almost 9 years ago)
- Last Synced: 2024-10-06T22:21:19.898Z (about 1 month ago)
- Topics: bootstrap, markdown, markdown-it
- Language: JavaScript
- Size: 7.81 KB
- Stars: 5
- Watchers: 1
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# markdown-it-alerts
[Markdown-it][markdown-it] plugin to create [Bootstrap alerts][bootstrap-alerts].E.g.:
```md
::: warning
Hello world! [Link](#).
:::
```Gets converted to:
```html
```## Install
```bash
$ npm install markdown-it-alerts --save
```## Usage
### Enable plugin
```js
var md = require('markdown-it');
var alerts = require('markdown-it-alerts');md().use(alerts);
```### Options
Enable/disable adding class `alert-link` to links inside alerts.
```js
var md = require('markdown-it');
var alerts = require('markdown-it-alerts');md().use(alerts, {links: false});
```### Example
With option `links` enabled (by default):
```md
This is a test. [Link](#).::: success
Hello world! [Link](#).
:::This is a test. [Link](#).
```Gets converted to:
```html
This is a test. Link.
This is a test. Link.
```[markdown-it]: https://github.com/markdown-it/markdown-it
[bootstrap-alerts]: http://getbootstrap.com/components/#alerts