chore: upgrade dependence
This commit is contained in:
parent
fe401bfc8b
commit
b2c0d40966
@ -42,7 +42,7 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
files: ['clientAppEnhance.ts'],
|
files: ['clientConfig.ts'],
|
||||||
rules: {
|
rules: {
|
||||||
'vue/match-component-file-name': 'off',
|
'vue/match-component-file-name': 'off',
|
||||||
},
|
},
|
||||||
|
|||||||
@ -5,21 +5,19 @@ author: pengzhanbo
|
|||||||
permalink: /article/exavsmm1
|
permalink: /article/exavsmm1
|
||||||
---
|
---
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
|
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` bash
|
``` bash
|
||||||
yarn add
|
yarn add
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
|
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` bash
|
``` bash
|
||||||
npm install
|
npm install
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
|
|
||||||
::::
|
:::
|
||||||
|
|
||||||
::: tip
|
::: tip
|
||||||
提示
|
提示
|
||||||
@ -49,7 +47,7 @@ npm install
|
|||||||
- [ ] todo
|
- [ ] todo
|
||||||
- [x] todo
|
- [x] todo
|
||||||
|
|
||||||
::: demo 普通代码
|
::: normal-demo 普通代码
|
||||||
```html
|
```html
|
||||||
<h3>这是一个代码片段</h3>
|
<h3>这是一个代码片段</h3>
|
||||||
<span>???</span>
|
<span>???</span>
|
||||||
|
|||||||
@ -19,23 +19,23 @@ permalink: /note/vuepress-plugin/caniuse/
|
|||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm install @vuepress-plume/vuepress-plugin-caniuse
|
npm install @vuepress-plume/vuepress-plugin-caniuse
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item yarn:active
|
@tab:active yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn add @vuepress-plume/vuepress-plugin-caniuse
|
yarn add @vuepress-plume/vuepress-plugin-caniuse
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item pnpm
|
@tab pnpm
|
||||||
``` sh
|
``` sh
|
||||||
pnpm add @vuepress-plume/vuepress-plugin-caniuse
|
pnpm add @vuepress-plume/vuepress-plugin-caniuse
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
@ -43,8 +43,8 @@ pnpm add @vuepress-plume/vuepress-plugin-caniuse
|
|||||||
|
|
||||||
将插件添加到你的 vuepress 项目的配置文件中:
|
将插件添加到你的 vuepress 项目的配置文件中:
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item .vuepress/config.ts
|
@tab .vuepress/config.ts
|
||||||
``` ts {2,6}
|
``` ts {2,6}
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { caniusePlugin } from '@vuepress-plume/vuepress-plugin-caniuse'
|
import { caniusePlugin } from '@vuepress-plume/vuepress-plugin-caniuse'
|
||||||
@ -55,8 +55,8 @@ export default defineUserConfig({
|
|||||||
]
|
]
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item .vuepress/config.js
|
@tab .vuepress/config.js
|
||||||
``` js {1,5}
|
``` js {1,5}
|
||||||
const { caniusePlugin } = require('@vuepress-plume/vuepress-plugin-caniuse')
|
const { caniusePlugin } = require('@vuepress-plume/vuepress-plugin-caniuse')
|
||||||
|
|
||||||
@ -66,8 +66,8 @@ module.exports = {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
### Step2:在markdown中使用
|
### Step2:在markdown中使用
|
||||||
|
|
||||||
|
|||||||
@ -22,20 +22,20 @@ permalink: /note/vuepress-plugin/netlify-functions/
|
|||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm install @vuepress-plume/vuepress-plugin-netlify-functions
|
npm install @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item yarn:active
|
@tab yarn:active
|
||||||
``` sh
|
``` sh
|
||||||
yarn add @vuepress-plume/vuepress-plugin-netlify-functions
|
yarn add @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item pnpm
|
@tab pnpm
|
||||||
``` sh
|
``` sh
|
||||||
pnpm add @vuepress-plume/vuepress-plugin-netlify-functions
|
pnpm add @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|||||||
@ -7,23 +7,22 @@ permalink: /note/vuepress-plugin/netlify-functions/usage/
|
|||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm install @vuepress-plume/vuepress-plugin-netlify-functions
|
npm install @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item yarn:active
|
@tab:active yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn add @vuepress-plume/vuepress-plugin-netlify-functions
|
yarn add @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item pnpm
|
@tab pnpm
|
||||||
``` sh
|
``` sh
|
||||||
pnpm add @vuepress-plume/vuepress-plugin-netlify-functions
|
pnpm add @vuepress-plume/vuepress-plugin-netlify-functions
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
## 在vuepress中使用
|
## 在vuepress中使用
|
||||||
|
|
||||||
@ -32,8 +31,8 @@ pnpm add @vuepress-plume/vuepress-plugin-netlify-functions
|
|||||||
|
|
||||||
在vuepress 的配置文件中 引入并 在 `plugins` 字段中添加插件。
|
在vuepress 的配置文件中 引入并 在 `plugins` 字段中添加插件。
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item .vuepress/config.ts
|
@tab .vuepress/config.ts
|
||||||
``` ts
|
``` ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { netlifyFunctionsPlugin } from '@vuepress-plume/vuepress-plugin-netlify-functions'
|
import { netlifyFunctionsPlugin } from '@vuepress-plume/vuepress-plugin-netlify-functions'
|
||||||
@ -45,8 +44,8 @@ export default defineUserConfig({
|
|||||||
// ...
|
// ...
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item .vuepress/config.js
|
@tab .vuepress/config.js
|
||||||
```js
|
```js
|
||||||
const { netlifyFunctionsPlugin } = require('@vuepress-plume/vuepress-plugin-netlify-functions')
|
const { netlifyFunctionsPlugin } = require('@vuepress-plume/vuepress-plugin-netlify-functions')
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -57,8 +56,8 @@ module.exports = {
|
|||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
### 编写 functions
|
### 编写 functions
|
||||||
|
|
||||||
@ -72,8 +71,8 @@ module.exports = {
|
|||||||
|
|
||||||
### 添加插件钩子
|
### 添加插件钩子
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item typescript
|
@tab typescript
|
||||||
``` ts
|
``` ts
|
||||||
import * as path from 'path'
|
import * as path from 'path'
|
||||||
import { App } from '@vuepress/core'
|
import { App } from '@vuepress/core'
|
||||||
@ -98,8 +97,8 @@ const myPlugin = (): Plugin => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item javascript
|
@tab javascript
|
||||||
``` js
|
``` js
|
||||||
const path = require('path')
|
const path = require('path')
|
||||||
const { useNetlifyFunctionsPlugin } = require('@vuepress-plume/vuepress-plugin-netlify-functions')
|
const { useNetlifyFunctionsPlugin } = require('@vuepress-plume/vuepress-plugin-netlify-functions')
|
||||||
@ -123,8 +122,8 @@ const myPlugin = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
在你的插件开发目录,假如是以下结构:
|
在你的插件开发目录,假如是以下结构:
|
||||||
``` sh
|
``` sh
|
||||||
@ -167,18 +166,18 @@ async function fetchMyFunction() {
|
|||||||
如果你的 `.env` 文件中有比较私密的信息,建议将 `.env` 文件添加到 `.gitignore` 中,避免提交到 仓库中。
|
如果你的 `.env` 文件中有比较私密的信息,建议将 `.env` 文件添加到 `.gitignore` 中,避免提交到 仓库中。
|
||||||
:::
|
:::
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item .env
|
@tab .env
|
||||||
```
|
```
|
||||||
YOUR_ENV_VAR='your env var'
|
YOUR_ENV_VAR='your env var'
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item functions/my_function.ts
|
@tab functions/my_function.ts
|
||||||
``` ts
|
``` ts
|
||||||
const YOUR_ENV_VAR = process.env.YOUR_ENV_VAR
|
const YOUR_ENV_VAR = process.env.YOUR_ENV_VAR
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||
|
|||||||
@ -36,23 +36,22 @@ __基于 `vuepress 2.0` 制作的 `Blog` 主题。__
|
|||||||
|
|
||||||
## 安装
|
## 安装
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn add @vuepress-plume/vuepress-theme-plume
|
yarn add @vuepress-plume/vuepress-theme-plume
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm i @vuepress-plume/vuepress-theme-plume
|
npm i @vuepress-plume/vuepress-theme-plume
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
## 使用
|
## 使用
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item ts
|
@tab ts
|
||||||
``` ts
|
``` ts
|
||||||
// .vuepress/config.ts
|
// .vuepress/config.ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
@ -63,8 +62,8 @@ export default defineUserConfig({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item js
|
@tab js
|
||||||
``` js
|
``` js
|
||||||
// .vuepress/config.js
|
// .vuepress/config.js
|
||||||
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
@ -75,7 +74,6 @@ module.exports = {
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
## 示例
|
## 示例
|
||||||
|
|
||||||
|
|||||||
@ -123,40 +123,39 @@ markdown 增强 由 [vuepress-plugin-md-enhance](https://vuepress-theme-hope.git
|
|||||||
如果需要给先让某个选项卡被激活,在标题后面补充`:active`后缀。
|
如果需要给先让某个选项卡被激活,在标题后面补充`:active`后缀。
|
||||||
|
|
||||||
````md
|
````md
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
|
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
```sh
|
```sh
|
||||||
yarn version
|
yarn version
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
|
|
||||||
::: code-group-item npm:active
|
|
||||||
|
@tab:active npm
|
||||||
```sh
|
```sh
|
||||||
npm version
|
npm version
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
|
|
||||||
::::
|
|
||||||
````
|
````
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn version
|
yarn version
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item npm:active
|
@tab:active npm
|
||||||
``` sh
|
``` sh
|
||||||
npm version
|
npm version
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
## 代码演示
|
## 代码演示
|
||||||
|
|
||||||
```` md
|
```` md
|
||||||
::: demo [类型] 可选的标题文字
|
::: [类型]-demo 可选的标题文字
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- ↑ 使用可用的语言 -->
|
<!-- ↑ 使用可用的语言 -->
|
||||||
@ -216,7 +215,7 @@ JSON 块是可选的,可用的配置详见[配置](https://vuepress-theme-hope
|
|||||||
|
|
||||||
### 不支持的语言
|
### 不支持的语言
|
||||||
|
|
||||||
::: demo 一个使用浏览器不支持解析语言 Demo
|
::: normal-demo 一个使用浏览器不支持解析语言 Demo
|
||||||
|
|
||||||
```md
|
```md
|
||||||
# 标题
|
# 标题
|
||||||
@ -244,7 +243,7 @@ h1 {
|
|||||||
|
|
||||||
:::: details 代码
|
:::: details 代码
|
||||||
```` md
|
```` md
|
||||||
::: demo 一个使用浏览器不支持解析语言 Demo
|
::: normal-demo 一个使用浏览器不支持解析语言 Demo
|
||||||
|
|
||||||
```md
|
```md
|
||||||
# 标题
|
# 标题
|
||||||
@ -276,7 +275,7 @@ h1 {
|
|||||||
### 普通代码演示
|
### 普通代码演示
|
||||||
格式:
|
格式:
|
||||||
```` md
|
```` md
|
||||||
::: demo 可选的标题文字
|
::: normal-demo 可选的标题文字
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<!-- html code -->
|
<!-- html code -->
|
||||||
@ -310,7 +309,7 @@ h1 {
|
|||||||
|
|
||||||
#### 例子
|
#### 例子
|
||||||
|
|
||||||
::: demo Demo 演示
|
::: normal-demo Demo 演示
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<h1>Hello Word!</h1>
|
<h1>Hello Word!</h1>
|
||||||
@ -333,7 +332,7 @@ span {
|
|||||||
|
|
||||||
:::: details 代码
|
:::: details 代码
|
||||||
```` md
|
```` md
|
||||||
::: demo Demo 演示
|
::: normal-demo Demo 演示
|
||||||
|
|
||||||
```html
|
```html
|
||||||
<h1>Hello Word!</h1>
|
<h1>Hello Word!</h1>
|
||||||
@ -360,7 +359,7 @@ span {
|
|||||||
|
|
||||||
#### 格式
|
#### 格式
|
||||||
```` md
|
```` md
|
||||||
::: demo [vue] 可选的标题文字
|
::: vue-demo 可选的标题文字
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<!-- ↑ 你也可以使用 html -->
|
<!-- ↑ 你也可以使用 html -->
|
||||||
@ -392,7 +391,7 @@ export default {
|
|||||||
|
|
||||||
#### 演示
|
#### 演示
|
||||||
|
|
||||||
::: demo [vue] 一个 Vue Composition 演示
|
::: vue-demo 一个 Vue Composition 演示
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<template>
|
<template>
|
||||||
@ -431,7 +430,7 @@ export default {
|
|||||||
|
|
||||||
:::: details 代码
|
:::: details 代码
|
||||||
```` md
|
```` md
|
||||||
::: demo [vue] 一个 Vue Composition 演示
|
::: vue-demo 一个 Vue Composition 演示
|
||||||
|
|
||||||
```vue
|
```vue
|
||||||
<template>
|
<template>
|
||||||
@ -475,7 +474,7 @@ export default {
|
|||||||
#### 格式
|
#### 格式
|
||||||
|
|
||||||
```` md
|
```` md
|
||||||
::: demo [react] 可选的标题文字
|
::: react-demo 可选的标题文字
|
||||||
|
|
||||||
```js
|
```js
|
||||||
// 放置脚本,并通过 `export default` 导出你的 react 组件
|
// 放置脚本,并通过 `export default` 导出你的 react 组件
|
||||||
@ -500,7 +499,7 @@ export default {
|
|||||||
|
|
||||||
#### 演示
|
#### 演示
|
||||||
|
|
||||||
::: demo [react] 一个函数式 React Demo
|
::: react-demo 一个函数式 React Demo
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const { useState } = React;
|
const { useState } = React;
|
||||||
@ -533,7 +532,7 @@ export default () => {
|
|||||||
|
|
||||||
:::: details 代码
|
:::: details 代码
|
||||||
```` md
|
```` md
|
||||||
::: demo [react] 一个函数式 React Demo
|
::: react-demo 一个函数式 React Demo
|
||||||
|
|
||||||
```js
|
```js
|
||||||
const { useState } = React;
|
const { useState } = React;
|
||||||
|
|||||||
@ -106,8 +106,8 @@ _notes
|
|||||||
|
|
||||||
则可以进行如下配置:
|
则可以进行如下配置:
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item config.ts
|
@tab config.ts
|
||||||
``` ts
|
``` ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import type {PlumeThemeOptions } from '@vuepress-plume/vuepress-theme-plume'
|
import type {PlumeThemeOptions } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
@ -122,8 +122,8 @@ export default defineUserConfig<PlumeThemeOptions>({
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item notes.ts
|
@tab notes.ts
|
||||||
``` ts
|
``` ts
|
||||||
export default [
|
export default [
|
||||||
{
|
{
|
||||||
@ -162,6 +162,5 @@ export default [
|
|||||||
]
|
]
|
||||||
```
|
```
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
其效果 即为 本文档 左侧 sidebar 展示效果。
|
其效果 即为 本文档 左侧 sidebar 展示效果。
|
||||||
|
|||||||
@ -24,8 +24,8 @@ permalink: /note/vuepress-theme-plume/theme-config/
|
|||||||
`VuePress` 支持的配置,请查阅 [官方文档](https://v2.vuepress.vuejs.org/zh/guide/configuration.html)
|
`VuePress` 支持的配置,请查阅 [官方文档](https://v2.vuepress.vuejs.org/zh/guide/configuration.html)
|
||||||
|
|
||||||
在 `Vuepress@v2`中对于主题的配置,引入主题函数,在函数中进行配置
|
在 `Vuepress@v2`中对于主题的配置,引入主题函数,在函数中进行配置
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item ts
|
@tab ts
|
||||||
``` ts {3,6-8}
|
``` ts {3,6-8}
|
||||||
// .vuepress/config.ts
|
// .vuepress/config.ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
@ -36,8 +36,8 @@ export default defineUserConfig({
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item js
|
@tab js
|
||||||
``` js {4-6}
|
``` js {4-6}
|
||||||
// .vuepress/config.js
|
// .vuepress/config.js
|
||||||
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
@ -47,8 +47,8 @@ module.exports = {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
|
|
||||||
## 配置
|
## 配置
|
||||||
@ -250,8 +250,8 @@ module.exports = {
|
|||||||
|
|
||||||
## 完整示例
|
## 完整示例
|
||||||
|
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item ts
|
@tab ts
|
||||||
``` ts
|
``` ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
@ -295,8 +295,8 @@ export default defineUserConfig({
|
|||||||
}),
|
}),
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item js
|
@tab js
|
||||||
``` js
|
``` js
|
||||||
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
module.exports = {
|
module.exports = {
|
||||||
@ -338,5 +338,5 @@ module.exports = {
|
|||||||
}),
|
}),
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|||||||
@ -25,38 +25,38 @@ permalink: /note/vuepress-theme-plume/quick-start/
|
|||||||
```
|
```
|
||||||
|
|
||||||
- __步骤2:__ 初始化项目
|
- __步骤2:__ 初始化项目
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` sh
|
``` sh
|
||||||
git init
|
git init
|
||||||
yarn init
|
yarn init
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
git init
|
git init
|
||||||
npm init
|
npm init
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
- __步骤3:__ 安装相关依赖
|
- __步骤3:__ 安装相关依赖
|
||||||
|
|
||||||
安装 `vuepress@next`和`@vuepress-plume/vuepress-theme-plume`作为本地依赖。
|
安装 `vuepress@next`和`@vuepress-plume/vuepress-theme-plume`作为本地依赖。
|
||||||
|
|
||||||
如果你是希望将已有的项目进行升级,请从 `步骤5` 开始
|
如果你是希望将已有的项目进行升级,请从 `步骤5` 开始
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn add -D vuepress@next @vuepress-plume/vuepress-theme-plume
|
yarn add -D vuepress@next @vuepress-plume/vuepress-theme-plume
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm i -D vuepress@next @vuepress-plume/vuepress-theme-plume
|
npm i -D vuepress@next @vuepress-plume/vuepress-theme-plume
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
- __步骤4:__ 在`package.json`中添加`script`
|
- __步骤4:__ 在`package.json`中添加`script`
|
||||||
|
|
||||||
@ -70,25 +70,25 @@ permalink: /note/vuepress-theme-plume/quick-start/
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
- __步骤5:__ 将默认的临时目录和缓存目录添加到`.gitignore` 文件中
|
- __步骤5:__ 将默认的临时目录和缓存目录添加到`.gitignore` 文件中
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item sh
|
@tab sh
|
||||||
``` sh
|
``` sh
|
||||||
echo 'node_modules' >> .gitignore
|
echo 'node_modules' >> .gitignore
|
||||||
echo '.temp' >> .gitignore
|
echo '.temp' >> .gitignore
|
||||||
echo '.cache' >> .gitignore
|
echo '.cache' >> .gitignore
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item .gitignore
|
@tab .gitignore
|
||||||
``` text
|
``` text
|
||||||
node_modules
|
node_modules
|
||||||
.temp
|
.temp
|
||||||
.cache
|
.cache
|
||||||
```
|
```
|
||||||
::::
|
:::
|
||||||
|
|
||||||
- __步骤6:__ 在 `.vuepress/config.ts` 中配置主题
|
- __步骤6:__ 在 `.vuepress/config.ts` 中配置主题
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item ts
|
@tab ts
|
||||||
``` ts {3,5-7}
|
``` ts {3,5-7}
|
||||||
// .vuepress/config.ts
|
// .vuepress/config.ts
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
@ -99,8 +99,8 @@ permalink: /note/vuepress-theme-plume/quick-start/
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item js
|
@tab js
|
||||||
``` js {2,4-6}
|
``` js {2,4-6}
|
||||||
// .vuepress/config.js
|
// .vuepress/config.js
|
||||||
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
import { themePlume } from '@vuepress-plume/vuepress-theme-plume'
|
||||||
@ -110,8 +110,8 @@ permalink: /note/vuepress-theme-plume/quick-start/
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
- __步骤7:__ 在`src` 目录下新建`README.md`文件
|
- __步骤7:__ 在`src` 目录下新建`README.md`文件
|
||||||
|
|
||||||
@ -122,18 +122,18 @@ permalink: /note/vuepress-theme-plume/quick-start/
|
|||||||
---
|
---
|
||||||
```
|
```
|
||||||
- __步骤8:__ 在本地服务器启动你的文档站点
|
- __步骤8:__ 在本地服务器启动你的文档站点
|
||||||
:::: code-group
|
::: code-tabs
|
||||||
::: code-group-item yarn
|
@tab yarn
|
||||||
``` sh
|
``` sh
|
||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
:::
|
|
||||||
::: code-group-item npm
|
@tab npm
|
||||||
``` sh
|
``` sh
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
:::
|
:::
|
||||||
::::
|
|
||||||
|
|
||||||
Vuepress 会在 [http://localhost:8080](http://localhost:8080) 。启动一个热重载的开发服务器。当你修改你的 Markdown 文件时,浏览器中的内容也会自动更新。
|
Vuepress 会在 [http://localhost:8080](http://localhost:8080) 。启动一个热重载的开发服务器。当你修改你的 Markdown 文件时,浏览器中的内容也会自动更新。
|
||||||
|
|
||||||
|
|||||||
@ -9,15 +9,15 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress-plume/vuepress-theme-plume": "workspace:*",
|
"@vuepress-plume/vuepress-theme-plume": "workspace:*",
|
||||||
"@vuepress/bundler-vite": "2.0.0-beta.45",
|
"@vuepress/bundler-vite": "2.0.0-beta.49",
|
||||||
"@vuepress/bundler-webpack": "2.0.0-beta.45",
|
"@vuepress/bundler-webpack": "2.0.0-beta.49",
|
||||||
"@vuepress/cli": "2.0.0-beta.45",
|
"@vuepress/cli": "2.0.0-beta.49",
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"anywhere": "^1.5.0",
|
"anywhere": "^1.5.0",
|
||||||
"leancloud-storage": "^4.12.2",
|
"leancloud-storage": "^4.12.2",
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.51.0",
|
||||||
"sass-loader": "^12.6.0",
|
"sass-loader": "^13.0.2",
|
||||||
"vue": "^3.2.33"
|
"vue": "^3.2.37"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
16
package.json
16
package.json
@ -50,7 +50,7 @@
|
|||||||
"@types/minimist": "^1.2.2",
|
"@types/minimist": "^1.2.2",
|
||||||
"@types/node": "^17.0.30",
|
"@types/node": "^17.0.30",
|
||||||
"@types/webpack-env": "^1.16.4",
|
"@types/webpack-env": "^1.16.4",
|
||||||
"bumpp": "^7.1.1",
|
"bumpp": "^7.2.0",
|
||||||
"chalk": "^4.1.2",
|
"chalk": "^4.1.2",
|
||||||
"commitizen": "^4.2.4",
|
"commitizen": "^4.2.4",
|
||||||
"concurrently": "^7.0.0",
|
"concurrently": "^7.0.0",
|
||||||
@ -58,22 +58,22 @@
|
|||||||
"cpx2": "^4.2.0",
|
"cpx2": "^4.2.0",
|
||||||
"cross-env": "^7.0.3",
|
"cross-env": "^7.0.3",
|
||||||
"cz-conventional-changelog": "^3.3.0",
|
"cz-conventional-changelog": "^3.3.0",
|
||||||
"eslint": "^8.14.0",
|
"eslint": "^8.20.0",
|
||||||
"eslint-config-vuepress": "^3.7.1",
|
"eslint-config-vuepress": "^3.10.0",
|
||||||
"eslint-config-vuepress-typescript": "^2.7.1",
|
"eslint-config-vuepress-typescript": "^2.9.1",
|
||||||
"execa": "^5.1.1",
|
"execa": "^5.1.1",
|
||||||
"handlebars": "^4.7.7",
|
"handlebars": "^4.7.7",
|
||||||
"husky": "^7.0.4",
|
"husky": "^7.0.4",
|
||||||
"lint-staged": "^12.4.0",
|
"lint-staged": "^12.4.0",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.6",
|
||||||
"ora": "^5.4.1",
|
"ora": "^5.4.1",
|
||||||
"prettier": "^2.6.2",
|
"prettier": "^2.7.1",
|
||||||
"prettier-config-vuepress": "^1.4.0",
|
"prettier-config-vuepress": "^1.4.0",
|
||||||
"rimraf": "^3.0.2",
|
"rimraf": "^3.0.2",
|
||||||
"sort-package-json": "^1.55.0",
|
"sort-package-json": "^1.55.0",
|
||||||
"ts-node": "^10.7.0",
|
"ts-node": "^10.9.1",
|
||||||
"typescript": "^4.6.3",
|
"typescript": "^4.7.4",
|
||||||
"vite": "^2.9.7"
|
"vite": "^2.9.14"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=14",
|
"node": ">=14",
|
||||||
|
|||||||
@ -26,10 +26,10 @@
|
|||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/shared": "2.0.0-beta.45",
|
"@vuepress/shared": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45"
|
"@vuepress/utils": "2.0.0-beta.49"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -31,10 +31,10 @@
|
|||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/cli": "2.0.0-beta.45",
|
"@vuepress/cli": "2.0.0-beta.49",
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"markdown-it-container": "^3.0.0"
|
"markdown-it-container": "^3.0.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
@ -26,12 +26,12 @@
|
|||||||
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
"ts:watch": "tsc -b tsconfig.build.json --watch"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/shared": "2.0.0-beta.45",
|
"@vuepress/shared": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"vue": "^3.2.33",
|
"vue": "^3.2.37",
|
||||||
"vue-router": "^4.0.15"
|
"vue-router": "^4.1.2"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -36,15 +36,15 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@iarna/toml": "^2.2.5",
|
"@iarna/toml": "^2.2.5",
|
||||||
"@netlify/functions": "^1.0.0",
|
"@netlify/functions": "^1.0.0",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/shared": "2.0.0-beta.45",
|
"@vuepress/shared": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"cpx2": "^4.2.0",
|
"cpx2": "^4.2.0",
|
||||||
"dotenv": "^16.0.1",
|
"dotenv": "^16.0.1",
|
||||||
"esbuild": "^0.14.39",
|
"esbuild": "^0.14.39",
|
||||||
"execa": "5.1.1",
|
"execa": "5.1.1",
|
||||||
"netlify-cli": "^10.3.1",
|
"netlify-cli": "^10.10.2",
|
||||||
"portfinder": "^1.0.28"
|
"portfinder": "^1.0.28"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
|
|||||||
@ -29,13 +29,13 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@netlify/functions": "^1.0.0",
|
"@netlify/functions": "^1.0.0",
|
||||||
"@vuepress-plume/vuepress-plugin-netlify-functions": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-netlify-functions": "workspace:*",
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/shared": "2.0.0-beta.45",
|
"@vuepress/shared": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"leancloud-storage": "^4.12.2",
|
"leancloud-storage": "^4.12.2",
|
||||||
"vue": "^3.2.33",
|
"vue": "^3.2.37",
|
||||||
"vue-router": "^4.0.15"
|
"vue-router": "^4.1.2"
|
||||||
},
|
},
|
||||||
"publishConfig": {
|
"publishConfig": {
|
||||||
"access": "public"
|
"access": "public"
|
||||||
|
|||||||
@ -39,41 +39,41 @@
|
|||||||
"@vuepress-plume/vuepress-plugin-baidu-tongji": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-baidu-tongji": "workspace:*",
|
||||||
"@vuepress-plume/vuepress-plugin-caniuse": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-caniuse": "workspace:*",
|
||||||
"@vuepress-plume/vuepress-plugin-copy-code": "workspace:*",
|
"@vuepress-plume/vuepress-plugin-copy-code": "workspace:*",
|
||||||
"@vuepress/client": "2.0.0-beta.45",
|
"@vuepress/client": "2.0.0-beta.49",
|
||||||
"@vuepress/core": "2.0.0-beta.45",
|
"@vuepress/core": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-active-header-links": "2.0.0-beta.45",
|
"@vuepress/plugin-active-header-links": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-container": "2.0.0-beta.45",
|
"@vuepress/plugin-container": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-docsearch": "2.0.0-beta.45",
|
"@vuepress/plugin-docsearch": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-external-link-icon": "2.0.0-beta.45",
|
"@vuepress/plugin-external-link-icon": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-git": "2.0.0-beta.45",
|
"@vuepress/plugin-git": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-medium-zoom": "2.0.0-beta.45",
|
"@vuepress/plugin-medium-zoom": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-nprogress": "2.0.0-beta.45",
|
"@vuepress/plugin-nprogress": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-palette": "2.0.0-beta.45",
|
"@vuepress/plugin-palette": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-prismjs": "2.0.0-beta.45",
|
"@vuepress/plugin-prismjs": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-search": "2.0.0-beta.45",
|
"@vuepress/plugin-search": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-theme-data": "2.0.0-beta.45",
|
"@vuepress/plugin-theme-data": "2.0.0-beta.49",
|
||||||
"@vuepress/plugin-toc": "2.0.0-beta.45",
|
"@vuepress/plugin-toc": "2.0.0-beta.49",
|
||||||
"@vuepress/shared": "2.0.0-beta.45",
|
"@vuepress/shared": "2.0.0-beta.49",
|
||||||
"@vuepress/utils": "2.0.0-beta.45",
|
"@vuepress/utils": "2.0.0-beta.49",
|
||||||
"@vueuse/core": "^8.2.3",
|
"@vueuse/core": "^8.2.3",
|
||||||
"chokidar": "^3.5.3",
|
"chokidar": "^3.5.3",
|
||||||
"date-fns": "^2.28.0",
|
"date-fns": "^2.28.0",
|
||||||
"gray-matter": "^4.0.3",
|
"gray-matter": "^4.0.3",
|
||||||
"json2yaml": "^1.1.0",
|
"json2yaml": "^1.1.0",
|
||||||
"lodash.merge": "^4.6.2",
|
"lodash.merge": "^4.6.2",
|
||||||
"nanoid": "^3.3.2",
|
"nanoid": "^3.3.4",
|
||||||
"sass": "^1.49.9",
|
"sass": "^1.51.0",
|
||||||
"sass-loader": "^12.6.0",
|
"sass-loader": "^13.0.2",
|
||||||
"ts-debounce": "^4.0.0",
|
"ts-debounce": "^4.0.0",
|
||||||
"vue": "^3.2.33",
|
"vue": "^3.2.37",
|
||||||
"vue-router": "^4.0.15",
|
"vue-router": "^4.1.2",
|
||||||
"vuepress-plugin-comment2": "2.0.0-beta.62",
|
"vuepress-plugin-comment2": "2.0.0-beta.87",
|
||||||
"vuepress-plugin-md-enhance": "2.0.0-beta.62",
|
"vuepress-plugin-md-enhance": "2.0.0-beta.87",
|
||||||
"vuepress-plugin-seo2": "2.0.0-beta.62",
|
"vuepress-plugin-seo2": "2.0.0-beta.87",
|
||||||
"vuepress-plugin-sitemap2": "2.0.0-beta.62"
|
"vuepress-plugin-sitemap2": "2.0.0-beta.87"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"sass-loader": "^12.6.0"
|
"sass-loader": "^13.0.2"
|
||||||
},
|
},
|
||||||
"peerDependenciesMeta": {
|
"peerDependenciesMeta": {
|
||||||
"sass-loader": {
|
"sass-loader": {
|
||||||
|
|||||||
@ -10,11 +10,13 @@ export const resolveMarkdownEnhance = (
|
|||||||
Object.assign(
|
Object.assign(
|
||||||
{
|
{
|
||||||
container: true, // info note tip warning danger details
|
container: true, // info note tip warning danger details
|
||||||
codegroup: true,
|
codetabs: true,
|
||||||
|
tabs: true,
|
||||||
align: true,
|
align: true,
|
||||||
mark: true,
|
mark: true,
|
||||||
tasklist: true,
|
tasklist: true,
|
||||||
demo: true,
|
demo: true,
|
||||||
|
attrs: true,
|
||||||
},
|
},
|
||||||
plugins.markdownEnhance || {}
|
plugins.markdownEnhance || {}
|
||||||
)
|
)
|
||||||
|
|||||||
5223
pnpm-lock.yaml
generated
5223
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -28,7 +28,7 @@ function filterVuePress(dependencies: string[]) {
|
|||||||
const includes = ['vue', 'vue-router']
|
const includes = ['vue', 'vue-router']
|
||||||
const vue = dependencies.filter(
|
const vue = dependencies.filter(
|
||||||
dependence => includes.includes(dependence)
|
dependence => includes.includes(dependence)
|
||||||
)
|
).map(dependence => dependence + '@latest')
|
||||||
return [...vue, ...vuepress]
|
return [...vue, ...vuepress]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user