# md-hl-loader

> markdown-it + highlight

Latest version **1.1.1** (published 2018-05-03) · ISC license · 0 weekly downloads

## Install

```sh
npm install md-hl-loader
pnpm add md-hl-loader
yarn add md-hl-loader
bun add md-hl-loader
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2018-05-03 |
| First published | 2018-04-10 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 10.6 KB |
| Known vulnerabilities | 0 (+3 in 2 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | lianer |
| Maintainers | lianer |
| Keywords | markdown, markdown-it, webpack, loader, highlight.js |

## Links

- npm: https://www.npmjs.com/package/md-hl-loader
- Repository: https://github.com/lianer/md-hl-loader
- Issues: https://github.com/lianer/md-hl-loader/issues
- npm.io page: https://npm.io/package/md-hl-loader

## Dependencies (5)

- [slash](https://npm.io/package/slash.md) ^2.0.0
- [is-relative](https://npm.io/package/is-relative.md) ^1.0.0
- [markdown-it](https://npm.io/package/markdown-it.md) ^8.4.1
- [highlight.js](https://npm.io/package/highlight.js.md) ^9.12.0
- [loader-utils](https://npm.io/package/loader-utils.md) ^1.1.0

## Alternatives

- [@mdxeditor/editor](https://npm.io/package/@mdxeditor/editor.md) — 962.4K weekly downloads
- [mmdb-lib](https://npm.io/package/mmdb-lib.md) — 680.9K weekly downloads
- [playcanvas](https://npm.io/package/playcanvas.md) — 36.2K weekly downloads
- [@glw907/cairn-cms](https://npm.io/package/@glw907/cairn-cms.md) — 967 weekly downloads
- [markdown-to-confluence](https://npm.io/package/markdown-to-confluence.md) — 103 weekly downloads

## Recent versions

- 1.1.1 (latest) — 2018-05-03
- 1.1.0 — 2018-04-24
- 1.0.1 — 2018-04-10
- 1.0.0 — 2018-04-10

## README

# md-hl-loader

> Markdown + Highlight.js => HTML

## Install

```bash
npm install md-hl-loader -D
```

## Configuration

webpack basic

```js
// ...
rules: [
  {
    test: /\.md$/,
    loader: 'md-hl-loader'
  }
]
// ...
```

with options

```js
// ...
rules: [
  {
    test: /\.md$/,
    loader: 'md-hl-loader',
    // https://github.com/markdown-it/markdown-it#init-with-presets-and-options
    options: {
      markdownItOptions: {
        html: true
      },
      compileImages: true // compile images
    }
  }
]
// ...
```

## Usage

article.md

```md
# Test
```

app.js

```js
import article from './article.md'
import 'highlight.js/styles/github.css'
console.log(article) // '<h1>Test</h1>'
```

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