Skip to content

About

extract frontmatter.title to h1

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

10 Commits

Folders and files

Repository files navigation

vitepress-plugin-frontmatter

this is a markdown-it plugin,it can extract frontmatter.title to h1 title

install

npm install vitepress-plugin-frontmatter --save

use

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.

About

extract frontmatter.title to h1

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages