$ npm install @mdit-vue/plugin-title
A markdown-it plugin to get page title.
env.title
.npm i @mdit-vue/plugin-title
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);
© 2010 - cnpmjs.org x YWFE | Home | YWFE