@mdit-vue/plugin-title
A markdown-it plugin to get markdown page title
Last updated 2 years ago by meteorlxy .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install @mdit-vue/plugin-title 
SYNC missed versions from official npm registry.

@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);

Current Tags

  • 2.1.3                                ...           latest (6 months ago)

21 Versions

  • 2.1.3                                ...           6 months ago
  • 2.1.2                                ...           7 months ago
  • 2.1.0                                ...           7 months ago
  • 2.0.0                                ...           a year ago
  • 1.0.0                                ...           a year ago
  • 0.12.1                                ...           a year ago
  • 0.12.0                                ...           2 years ago
  • 0.11.2                                ...           2 years ago
  • 0.11.1                                ...           2 years ago
  • 0.11.0                                ...           2 years ago
  • 0.10.0                                ...           2 years ago
  • 0.9.3                                ...           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
Maintainers (1)
Downloads
Total 0
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (2)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE