2.1.2 • Published 19 days ago

@mdit-vue/plugin-title v2.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
19 days ago

@mdit-vue/plugin-title

npm license

A markdown-it plugin to get page title.

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

Install

npm i @mdit-vue/plugin-title

Usage

import { titlePlugin } from '@mdit-vue/plugin-title';
import type { MarkdownItEnv } from '@mdit-vue/types';
import MarkdownIt from 'markdown-it';

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

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

console.log(env.title);
2.1.2

19 days ago

2.1.0

26 days ago

2.0.0

5 months ago

1.0.0

7 months ago

0.12.1

8 months ago

0.12.0

1 year ago

0.11.2

1 year ago

0.9.3

2 years ago

0.10.0

2 years ago

0.11.0

2 years ago

0.11.1

2 years ago

0.9.2

2 years ago

0.9.1

2 years ago

0.9.0

2 years ago

0.8.0

2 years ago

0.7.1

2 years ago

0.7.0

2 years ago

0.6.0

2 years ago

0.5.0

2 years ago

0.4.0

2 years ago