vitepress-plugin-frontmatter
v2.0.1
Published
extract frontmatter.title to h1
Maintainers
Readme
vitepress-plugin-frontmatter
this is a markdown-it plugin,it can extract frontmatter.title to h1 title
install
npm install vitepress-plugin-frontmatter --saveuse
import { fmTitlePlugin } from 'vitepress-plugin-frontmatter'
import { defineConfig } from 'vitepress'
export default defineConfig({
// other config
markdown: {
config(md) {
md.use(fmTitlePlugin)
},
},
})example
// x.md
---
title: H1 title // only set frontmatter.title
---
++ # H1 title // and auto add it
<!-- other content -->License
vitepress-plugin-frontmatter is distributed under the MIT License - see the LICENSE file for details.
