# contently-transform-markdown

> Uses [Remark](https://github.com/remarkjs/remark) to transform your Markdown content.

Latest version **2.0.0-alpha.0** (published 2021-03-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install contently-transform-markdown
pnpm add contently-transform-markdown
yarn add contently-transform-markdown
bun add contently-transform-markdown
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0-alpha.0 |
| Published | 2021-03-08 |
| First published | 2019-09-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 10 |
| Unpacked size | 12.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | krmax44 |
| Maintainers | krmax44 |

## Links

- npm: https://www.npmjs.com/package/contently-transform-markdown
- Repository: https://github.com/krmax44/contently
- Homepage: https://github.com/krmax44/contently#readme
- Issues: https://github.com/krmax44/contently/issues
- npm.io page: https://npm.io/package/contently-transform-markdown

## Dependencies (10)

- [yaml](https://npm.io/package/yaml.md) ^1.10.0
- [vfile](https://npm.io/package/vfile.md) ^4.2.1
- [remark](https://npm.io/package/remark.md) ^13.0.0
- [unified](https://npm.io/package/unified.md) ^9.2.1
- [remark-html](https://npm.io/package/remark-html.md) ^13.0.1
- [always-array](https://npm.io/package/always-array.md) ^1.1.0
- [remark-parse](https://npm.io/package/remark-parse.md) ^9.0.0
- [unist-util-visit](https://npm.io/package/unist-util-visit.md) ^2.0.3
- [remark-frontmatter](https://npm.io/package/remark-frontmatter.md) ^3.0.0
- [remark-extract-frontmatter](https://npm.io/package/remark-extract-frontmatter.md) ^3.1.0

## Recent versions

- 2.0.0-alpha.0 (latest) — 2021-03-08
- 0.3.0 — 2019-09-15
- 0.2.2 — 2019-09-13
- 0.2.1 — 2019-09-12
- 0.2.0 — 2019-09-11
- 0.1.1 — 2019-09-09
- 0.1.0 — 2019-09-06

## README

# Contently Transform Markdown

Uses [Remark](https://github.com/remarkjs/remark) to transform your Markdown content.

## Usage

```ts
import ContentlyTransformMarkdown from 'contently-transform-markdown';

contently.use(ContentlyTransformMarkdown, options?);
```

## Options

```ts
interface Options {
	/**
	 * @name plugins
	 * @description An array of Remark plugins.
	 * @default 'html,frontmatter,extract-frontmatter'
	 */
	plugins: Array<{ plugin: any; options?: any }>;
}
```

## Asset resolving

TODO: explain it

## Built-in Remark plugins

By default, the following plugins are loaded, which you can modify using hooks as shown above:

- `html`: transforms Markdown to HTML
- `frontmatter`: parses YAML frontmatter
- `extract`: adds frontmatter data to the vfile
- [`assetResolver`](https://github.com/krmax44/contently/blob/main/packages/contently-transform-markdown/src/plugins/assetResolver.ts): custom plugin, allows you to hook into asset loading (see above)
- [`excerptGenerator`](https://github.com/krmax44/contently/blob/main/packages/contently-transform-markdown/src/excerptGenerator.ts): also custom, adds an excerpt to the result's attributes, which is either the frontmatter value of `excerpt`, all paragraphs before a `<!-- more -->` tag or the first paragraph of text (in that order).

---
_Source: https://npm.io/package/contently-transform-markdown · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
