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