# @mdit-vue/plugin-title

> A markdown-it plugin to get markdown page title

Latest version **4.0.0** (published 2026-11-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install @mdit-vue/plugin-title
pnpm add @mdit-vue/plugin-title
yarn add @mdit-vue/plugin-title
bun add @mdit-vue/plugin-title
```

## Health

**Score 75/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; recently updated; high maintenance score; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2026-11-09 |
| First published | 2022-07-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=20.19.0 |
| Dependencies | 3 |
| Unpacked size | 3.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 221 |
| Author | meteorlxy |
| Maintainers | meteorlxy |
| Keywords | markdown-it, markdown-it-plugin, title, vue |

## Links

- npm: https://www.npmjs.com/package/@mdit-vue/plugin-title
- Repository: https://github.com/mdit-vue/mdit-vue
- Homepage: https://github.com/mdit-vue
- Issues: https://github.com/mdit-vue/mdit-vue/issues
- npm.io page: https://npm.io/package/@mdit-vue/plugin-title

## Dependencies (3)

- [markdown-it](https://npm.io/package/markdown-it.md) ^15.0.3
- [@mdit-vue/types](https://npm.io/package/@mdit-vue/types.md) 4.0.0
- [@mdit-vue/shared](https://npm.io/package/@mdit-vue/shared.md) 4.0.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

- 4.0.0 (latest) — 2026-11-09
- 3.0.2 — 2025-08-11
- 3.0.1 — 2025-08-11
- 3.0.0 — 2025-08-11
- 2.1.4 — 2025-04-10
- 2.1.3 — 2024-05-13
- 2.1.2 — 2024-04-15
- 2.1.0 — 2024-04-08
- 2.0.0 — 2023-12-08
- 1.0.0 — 2023-09-26
- 0.12.1 — 2023-08-24
- 0.12.0 — 2023-02-10
- 0.11.2 — 2022-12-23
- 0.11.1 — 2022-08-30
- 0.11.0 — 2022-08-25
- … 11 more at https://npm.io/package/@mdit-vue/plugin-title/versions

## README

# @mdit-vue/plugin-title

[![npm](https://badgen.net/npm/v/@mdit-vue/plugin-title)](https://www.npmjs.com/package/@mdit-vue/plugin-title)
[![license](https://badgen.net/github/license/mdit-vue/mdit-vue)](https://github.com/mdit-vue/mdit-vue/blob/main/LICENSE)

A [markdown-it](https://github.com/markdown-it/markdown-it) plugin to get page title.

- Extracts title (the content of the first level-1 heading) into markdown-it `env.title`.

## Install

```sh
npm i @mdit-vue/plugin-title
```

## Usage

```ts
import { titlePlugin } from '@mdit-vue/plugin-title';
import type { Env } from 'markdown-it';
import MarkdownIt from 'markdown-it';

const md = MarkdownIt({ html: true }).use(titlePlugin);
const env: Env = {};

const rendered = md.render(
  `\
# h1
## h2
### h3
`,
  env,
);

console.log(env.title);
```

---
_Source: https://npm.io/package/@mdit-vue/plugin-title · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
