vuepress-plugin-auto-front-matter

0.2.6 • Public • Published

vuepress-plugin-auto-front-matter

自动生成部分重复性的 Front Matter。

----
author:
title:
date:
summary:
description:
location:
----

Installation

yarn add -D vuepress-plugin-auto-front-matter
// or npm install vuepress-plugin-auto-front-matter -D
 

Usage

// .vuepress/config.js
 
module.exports = {
    plugins: [
      ['auto-front-matter'],
      // other plugins
    ]
}
 
// or
module.exports = {
    plugins: [
      ['auto-front-matter',{
        author: 'Artiely' // 默认的全局作者
        summary: '详情请查看', // 默认的全局说明
        summaryLength: 200  // 说明的长度
        location: 'Wuhan,China' // 默认的全局地址
      }],
      // other plugins
    ]
}

result

$page:{
  frontmatter:{
    title: "....",
    date: "2020-4-1",
    author: "Artiely",
    summary: "......",
    description: "......",
    location: "Wuhan,China",
    // ...
  }
}
 

demo

https://artiely.gitee.io

Readme

Keywords

none

Package Sidebar

Install

npm i vuepress-plugin-auto-front-matter

Weekly Downloads

12

Version

0.2.6

License

MIT

Unpacked Size

6.06 kB

Total Files

4

Last publish

Collaborators

  • artiely