@mdit-vue/plugin-title
@mdit-vue/plugin-title
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);
Related Packages
@mdit-vue/plugin-toc
A markdown-it plugin to generate table-of-contents that compatible with Vue.js
1,830,077
221
Version History
| Version | Released | License |
|---|---|---|
| 3.0.2 | MIT | |
| 3.0.1 | MIT | |
| 3.0.0 | MIT | |
| 2.1.4 | MIT | |
| 2.1.3 | MIT | |
| 2.1.2 | MIT | |
| 2.1.0 | MIT | |
| 2.0.0 | MIT | |
| 1.0.0 | MIT | |
| 0.12.1 | MIT | |
| 0.12.0 | MIT | |
| 0.11.2 | MIT | |
| 0.11.1 | MIT | |
| 0.11.0 | MIT | |
| 0.10.0 | MIT | |
| 0.9.3 | MIT | |
| 0.9.2 | MIT | |
| 0.9.1 | MIT | |
| 0.9.0 | MIT | |
| 0.8.0 | MIT | |
| 0.7.1 | MIT | |
| 0.7.0 | MIT | |
| 0.6.0 | MIT | |
| 0.5.0 | MIT | |
| 0.4.0 | MIT |