feat: v1.11.0 - 添加新配置项extendFrontmatter,用于扩展自动生成frontmatter

This commit is contained in:
xugaoyi 2022-04-12 14:38:08 +08:00
parent 6fed91182b
commit 369cb90065
53 changed files with 252 additions and 106 deletions

View File

@ -9,8 +9,8 @@ import baiduCode from './config/baiduCode' // 百度统计hm码
import htmlModules from './config/htmlModules' // 自定义插入的html块
export default defineConfig4CustomTheme<VdoingThemeConfig>({
// theme: 'vdoing', // 使用npm主题包
theme: resolve(__dirname, '../../vdoing'), // 使用本地主题包
theme: 'vdoing', // 使用npm主题包
// theme: resolve(__dirname, '../../vdoing'), // 使用本地主题包
locales: {
'/': {
@ -196,21 +196,12 @@ export default defineConfig4CustomTheme<VdoingThemeConfig>({
'Evan Xu | <a href="https://github.com/xugaoyi/vuepress-theme-vdoing/blob/master/LICENSE" target="_blank">MIT License</a>', // 博客版权信息支持a标签或换行标签</br>
},
// 扩展自动生成frontmatter。 (不会覆盖已有的数据,仅在相应属性不存在时才会自动添加)
// 扩展自动生成frontmatter。当md文件的frontmatter不存在相应的字段时将自动添加。不会覆盖已有的数据。
extendFrontmatter: {
test1: false,
test2: 1,
test3: '字符串',
test4: [
1, 2, 3
],
test5: {
prop: 'abc',
prop2: [{
child: true,
}]
},
test6: 1.9
author: {
name: 'xugaoyi',
link: 'https://github.com/xugaoyi'
}
},
// 自定义hmtl(广告)模块

View File

@ -12,5 +12,8 @@ sidebar: false
article: false
comment: false
editLink: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -12,4 +12,7 @@ sidebar: false
article: false
comment: false
editLink: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -12,4 +12,7 @@ sidebar: false
article: false
comment: false
editLink: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -12,4 +12,7 @@ sidebar: false
article: false
comment: false
editLink: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -7,7 +7,10 @@ categories:
- JavaScript文章
- 三级目录
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## 测试文件

View File

@ -7,6 +7,9 @@ categories:
tags:
- 笔记
- 红宝书
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 《JavaScript高级程序设计》笔记

View File

@ -7,6 +7,9 @@ categories:
- 学习笔记
tags:
- TypeScript
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# TypeScript 学习笔记

View File

@ -7,6 +7,9 @@ categories:
- 学习笔记
tags:
- 设计模式
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# JS设计模式总结笔记

View File

@ -6,7 +6,10 @@ categories:
- 页面
- CSS
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## Flex 布局教程:语法篇

View File

@ -8,6 +8,9 @@ categories:
tags:
- 实用技巧
- 文摘
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
每当你发现很难开始执行某项任务时可以试试将其缩减成2分钟的版本。

View File

@ -11,6 +11,9 @@ tags:
- JavaScript
- css
- 实用技巧
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 一行代码“黑”掉任意网站

View File

@ -4,6 +4,9 @@ date: 2019-12-25 14:27:01
permalink: /friends
article: false
sidebar: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
<!--

View File

@ -4,6 +4,9 @@ date: 2019-12-25 14:27:01
permalink: /about
sidebar: false
article: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## 📚Blog

View File

@ -3,6 +3,9 @@ title: 网站
permalink: /pages/beb6c0bd8a66cea6
date: 2020-04-19 11:33:04
article: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 个人收藏夹

View File

@ -3,6 +3,9 @@ title: 常用的前端轮子
date: 2021-10-09 19:42:02
permalink: /pages/47cf96/
article: false
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## React UI 组件库

View File

@ -7,7 +7,10 @@ sidebar: auto
categories:
- 随笔
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 常用Git命令清单

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# rebase分支合并

View File

@ -6,5 +6,8 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
![Git命令思维导图](/img/git.png)

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git基础与命令

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git 工具 - 重写历史

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git 工具 - 重置揭密

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-分支原理

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支的新建与合并-分支操作

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支管理-查看分支

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支开发工作流

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-远程分支

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-变基

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git工具-查看修订版本

View File

@ -6,6 +6,9 @@ categories:
- 《Git》学习笔记
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git工具-交互式暂存

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01. JSX简介

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 02. 元素渲染

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 03. 组件 & Props

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 04. State & 生命周期

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 05. 事件处理

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 06. 条件渲染

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 07. 列表 & Key

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 08. 表单

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 09. 状态提升 (共享状态)

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 10.组合vs继承

View File

@ -7,6 +7,9 @@ categories:
- 核心概念
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 11.React哲学编写一个复杂组件的原则

View File

@ -7,5 +7,8 @@ categories:
- 高级指引
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01.高级指引

View File

@ -7,6 +7,9 @@ categories:
- Hook
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01. Hook概述

View File

@ -6,7 +6,10 @@ categories:
- 《React》笔记
- Hook
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 02. 使用State Hook

View File

@ -6,7 +6,10 @@ categories:
- 《React》笔记
- Hook
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 03. 使用Effect Hook副作用钩子

View File

@ -6,7 +6,10 @@ categories:
- 《React》笔记
- Hook
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 04. Hook规则

View File

@ -6,7 +6,10 @@ categories:
- 《React》笔记
- Hook
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 05. 自定义 Hook

View File

@ -7,6 +7,9 @@ categories:
- 案例演示
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 案例演示

View File

@ -6,7 +6,10 @@ categories:
- 《Vue》笔记
- Vuex
tags:
-
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Vuex

View File

@ -24,7 +24,7 @@
"vuepress-plugin-one-click-copy": "^1.0.2",
"vuepress-plugin-thirdparty-search": "^1.0.2",
"vuepress-plugin-zooming": "^1.1.7",
"vuepress-theme-vdoing": "^1.10.4",
"vuepress-theme-vdoing": "^1.11.0",
"yamljs": "^0.3.0"
}
}

View File

@ -1,6 +1,6 @@
{
"name": "vuepress-theme-vdoing",
"version": "1.10.4",
"version": "1.11.0",
"description": "Vdoing theme for VuePress. 一个基于VuePress的知识管理兼博客主题。",
"author": {
"name": "gaoyi(Evan) Xu"

View File

@ -131,6 +131,14 @@ export interface VdoingThemeConfig extends NoSidebar4DefaultThemeConfig {
copyrightInfo: string
}
/**
* frontmatter
* md文件的frontmatter不存在相应的字段时将自动添加
*/
extendFrontmatter?: {
[key: string]: any
}
/**
* hmtl(广)
* @see: https://doc.xugaoyi.com/pages/a20ce8/#htmlmodules