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: about 1 year 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 (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-02T14:33:42.000Z (over 10 years ago)
- Last Synced: 2025-03-19T03:54:03.675Z (over 1 year 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