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

@ -1,7 +1,7 @@
---
pageComponent:
pageComponent:
name: Catalogue
data:
data:
key: 02.页面
imgUrl: /img/ui.png
description: html(5)/css(3),前端页面相关技术
@ -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

@ -2,12 +2,15 @@
title: 四级文件(测试)
date: 2020-12-11 11:15:53
permalink: /pages/8481d1/
categories:
categories:
- 前端
- JavaScript文章
- 三级目录
tags:
-
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

@ -2,11 +2,14 @@
title: TypeScript笔记
date: 2020-10-08 13:02:48
permalink: /pages/51afd6/
categories:
categories:
- 前端
- 学习笔记
tags:
tags:
- TypeScript
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# TypeScript 学习笔记

View File

@ -2,11 +2,14 @@
title: JS设计模式总结笔记
date: 2021-02-27 20:01:18
permalink: /pages/4643cd/
categories:
categories:
- 前端
- 学习笔记
tags:
tags:
- 设计模式
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# JS设计模式总结笔记

View File

@ -2,11 +2,14 @@
title: CSS教程和技巧收藏
date: 2020-08-11 17:13:52
permalink: /pages/c8f128/
categories:
categories:
- 页面
- CSS
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## Flex 布局教程:语法篇

View File

@ -2,12 +2,15 @@
title: 2分钟规则
date: 2020-11-09 11:05:29
permalink: /pages/baaa02/
categories:
categories:
- 更多
- 实用技巧
tags:
tags:
- 实用技巧
- 文摘
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
每当你发现很难开始执行某项任务时可以试试将其缩减成2分钟的版本。

View File

@ -4,13 +4,16 @@ date: 2021-11-25 14:33:51
permalink: /pages/dcebaf/
titleTag: 原创
sticky: 1
categories:
categories:
- 更多
- 实用技巧
tags:
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

@ -4,10 +4,13 @@ date: 2022-01-28 14:59:51
permalink: /pages/829589/
titleTag: 原创
sidebar: auto
categories:
categories:
- 随笔
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---

View File

@ -2,10 +2,13 @@
title: 常用Git命令清单
date: 2020-11-18 17:43:57
permalink: /pages/8292d8/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 常用Git命令清单

View File

@ -2,10 +2,13 @@
title: Git变基合并
date: 2020-11-18 17:43:57
permalink: /pages/c10281/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# rebase分支合并

View File

@ -2,9 +2,12 @@
title: Git命令思维导图
date: 2020-11-18 17:46:22
permalink: /pages/4cbc21/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
![Git命令思维导图](/img/git.png)

View File

@ -2,10 +2,13 @@
title: Git基础与命令
date: 2020-11-18 17:43:57
permalink: /pages/635088/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git基础与命令

View File

@ -2,10 +2,13 @@
title: Git工具-重写历史
date: 2020-11-18 17:43:57
permalink: /pages/1832fe/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git 工具 - 重写历史

View File

@ -2,10 +2,13 @@
title: Git工具-重置揭密
date: 2020-11-18 17:43:57
permalink: /pages/d9e9c6/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git 工具 - 重置揭密

View File

@ -2,10 +2,13 @@
title: Git分支-分支原理
date: 2020-11-18 17:43:57
permalink: /pages/4bef1a/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-分支原理

View File

@ -2,10 +2,13 @@
title: Git分支的新建与合并-分支操作
date: 2020-11-18 17:43:57
permalink: /pages/ea5a8c/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支的新建与合并-分支操作

View File

@ -2,10 +2,13 @@
title: Git分支管理-查看分支
date: 2020-11-18 17:43:57
permalink: /pages/a399b3/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支管理-查看分支

View File

@ -2,10 +2,13 @@
title: Git分支开发工作流
date: 2020-11-18 17:43:57
permalink: /pages/49ee30/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支开发工作流

View File

@ -2,10 +2,13 @@
title: Git分支-远程分支
date: 2020-11-18 17:43:57
permalink: /pages/574d62/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-远程分支

View File

@ -2,10 +2,13 @@
title: Git分支-变基
date: 2020-11-18 17:43:57
permalink: /pages/3a3247/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git分支-变基

View File

@ -2,10 +2,13 @@
title: Git工具-查看修订版本
date: 2020-11-18 17:43:57
permalink: /pages/c984d1/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git工具-查看修订版本

View File

@ -2,10 +2,13 @@
title: Git工具-交互式暂存
date: 2020-11-18 17:43:57
permalink: /pages/76d859/
categories:
categories:
- 《Git》学习笔记
tags:
tags:
- Git
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# Git工具-交互式暂存

View File

@ -2,11 +2,14 @@
title: JSX简介
date: 2021-03-24 17:56:40
permalink: /pages/5df969/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01. JSX简介

View File

@ -2,11 +2,14 @@
title: 元素渲染
date: 2021-03-24 17:56:40
permalink: /pages/b5d372/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 02. 元素渲染

View File

@ -2,11 +2,14 @@
title: 组件&Props
date: 2021-03-24 17:56:40
permalink: /pages/9ac43a/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 03. 组件 & Props

View File

@ -2,11 +2,14 @@
title: State&生命周期
date: 2021-03-24 17:56:40
permalink: /pages/1e3ca2/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 04. State & 生命周期

View File

@ -2,11 +2,14 @@
title: 事件处理
date: 2021-03-24 17:56:40
permalink: /pages/f27775/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 05. 事件处理

View File

@ -2,11 +2,14 @@
title: 条件渲染
date: 2021-03-24 17:56:40
permalink: /pages/8fcda8/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 06. 条件渲染

View File

@ -2,11 +2,14 @@
title: 列表&Key
date: 2021-03-24 17:56:40
permalink: /pages/88f4b0/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 07. 列表 & Key

View File

@ -2,11 +2,14 @@
title: 表单
date: 2021-03-24 17:56:40
permalink: /pages/002db7/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 08. 表单

View File

@ -2,11 +2,14 @@
title: 状态提升 (共享状态)
date: 2021-03-26 09:56:40
permalink: /pages/f0e3d2/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 09. 状态提升 (共享状态)

View File

@ -2,11 +2,14 @@
title: 组合vs继承
date: 2021-03-26 12:56:40
permalink: /pages/9ae8e8/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 10.组合vs继承

View File

@ -2,11 +2,14 @@
title: React哲学
date: 2021-03-26 17:56:40
permalink: /pages/c689bf/
categories:
categories:
- 《React》笔记
- 核心概念
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 11.React哲学编写一个复杂组件的原则

View File

@ -2,10 +2,13 @@
title: 高级指引
date: 2021-03-25 19:46:01
permalink: /pages/b7ec27/
categories:
categories:
- 《React》笔记
- 高级指引
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01.高级指引

View File

@ -2,11 +2,14 @@
title: Hook概述
date: 2021-03-31 11:30:03
permalink: /pages/4c13b9/
categories:
categories:
- 《React》笔记
- Hook
tags:
tags:
- React
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 01. Hook概述

View File

@ -2,11 +2,14 @@
title: 使用State Hook
date: 2021-04-06 19:13:06
permalink: /pages/82baa3/
categories:
categories:
- 《React》笔记
- Hook
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 02. 使用State Hook

View File

@ -2,11 +2,14 @@
title: 使用Effect Hook
date: 2021-04-06 19:13:06
permalink: /pages/72710d/
categories:
categories:
- 《React》笔记
- Hook
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 03. 使用Effect Hook副作用钩子

View File

@ -2,11 +2,14 @@
title: Hook规则
date: 2021-04-06 19:13:06
permalink: /pages/723be7/
categories:
categories:
- 《React》笔记
- Hook
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 04. Hook规则

View File

@ -2,11 +2,14 @@
title: 自定义 Hook
date: 2021-04-06 19:13:06
permalink: /pages/cf1018/
categories:
categories:
- 《React》笔记
- Hook
tags:
-
tags:
- null
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
# 05. 自定义 Hook

View File

@ -2,11 +2,14 @@
title: 案例演示
date: 2021-03-27 15:04:09
permalink: /pages/87146f/
categories:
categories:
- 《React》笔记
- 案例演示
tags:
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