https://github.com/kanakkholwal/remark-plugins
A collection of remark plugins for markdown processing.
https://github.com/kanakkholwal/remark-plugins
Last synced: 2 months ago
JSON representation
A collection of remark plugins for markdown processing.
- Host: GitHub
- URL: https://github.com/kanakkholwal/remark-plugins
- Owner: kanakkholwal
- Created: 2024-06-17T07:17:44.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-06-17T07:55:11.000Z (12 months ago)
- Last Synced: 2025-03-14T23:37:36.327Z (3 months ago)
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# remark-plugins
A collection of remark plugins for markdown processing.
## Installation
```bash
npm install remark-plugins
# or
yarn add remark-plugins
# or
bun install remark-plugins
# or
pnpm install remark-plugins
```
> Note : These plugins requires `remark-directive` package to run so make sure to install that and call just before remark-plugins.
> ```js
> import remarkDirective from 'remark-directive';
> ```
## Plugins### 1. Callout Plugin
#### Description
Transforms custom callout blocks in markdown into styled callouts.
#### Usage
```js
import remarkCallout from 'remark-plugins/callout';
// or
import {remarkCallout} from 'remark-plugins';
{markdown}```
#### Markdown Syntax
```md
::callout[warn]{title=Warning}
This is a custom note content.
:::
```### 2. Embed Plugin
#### Description
Transforms custom embed blocks in markdown into iframe embeds for YouTube, Vimeo, and other platforms.
#### Usage
```js
import remarkEmbedfrom 'remark-plugins/embed';
// or
import {remarkEmbed} from 'remark-plugins';
{markdown}```
#### Markdown Syntax
```md
::embed[youtube]{id=yaodD79Q4iE .some-class}
# or
::embed[iframe]{id=http://google.com .some-class}```
### 3. Slugify Headings Plugin
#### Description
Automatically generates slugified IDs for headings in markdown.
#### Usage
```js
import slugifyHeading from 'remark-plugins/slugify-heading';
// or
import {slugifyHeading} from 'remark-plugins';{markdown}
```
#### Markdown Syntax
```md
# My HeadingThis heading will have an ID of `my-heading`.
```