docs: update docs
This commit is contained in:
parent
7a1bc8f73d
commit
bf4b8dcb06
@ -2,11 +2,17 @@ import { type ClientConfig, defineClientConfig } from 'vuepress/client'
|
|||||||
import HeroTintPlateConfig from './themes/components/HeroTintPlateConfig.vue'
|
import HeroTintPlateConfig from './themes/components/HeroTintPlateConfig.vue'
|
||||||
import CanIUseConfig from './themes/components/CanIUseConfig.vue'
|
import CanIUseConfig from './themes/components/CanIUseConfig.vue'
|
||||||
import Demos from './themes/components/Demos.vue'
|
import Demos from './themes/components/Demos.vue'
|
||||||
|
import ThemeColors from './themes/components/ThemeColors.vue'
|
||||||
|
import { setupThemeColors } from './themes/composables/theme-colors.js'
|
||||||
|
|
||||||
export default defineClientConfig({
|
export default defineClientConfig({
|
||||||
enhance({ app }) {
|
enhance({ app }) {
|
||||||
app.component('HeroTintPlateConfig', HeroTintPlateConfig)
|
app.component('HeroTintPlateConfig', HeroTintPlateConfig)
|
||||||
app.component('CanIUseConfig', CanIUseConfig)
|
app.component('CanIUseConfig', CanIUseConfig)
|
||||||
app.component('Demos', Demos)
|
app.component('Demos', Demos)
|
||||||
|
app.component('ThemeColors', ThemeColors)
|
||||||
|
},
|
||||||
|
setup() {
|
||||||
|
setupThemeColors()
|
||||||
},
|
},
|
||||||
}) as ClientConfig
|
}) as ClientConfig
|
||||||
|
|||||||
@ -147,7 +147,7 @@ export const zhNotes = definePlumeNotesConfig({
|
|||||||
{
|
{
|
||||||
text: '工具',
|
text: '工具',
|
||||||
icon: 'tabler:tools',
|
icon: 'tabler:tools',
|
||||||
items: ['home-hero-tint-plate', 'caniuse'],
|
items: ['custom-theme', 'home-hero-tint-plate', 'caniuse'],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@ -127,19 +127,19 @@ config:
|
|||||||
:::code-tabs
|
:::code-tabs
|
||||||
@tab pnpm
|
@tab pnpm
|
||||||
|
|
||||||
```sh
|
```sh :no-line-numbers
|
||||||
pnpm add vuepress@next vuepress-theme-plume vue
|
pnpm add vuepress@next vuepress-theme-plume vue
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab npm
|
@tab npm
|
||||||
|
|
||||||
```sh
|
```sh :no-line-numbers
|
||||||
npm install vuepress@next vuepress-theme-plume
|
npm install vuepress@next vuepress-theme-plume
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab yarn
|
@tab yarn
|
||||||
|
|
||||||
```sh
|
```sh :no-line-numbers
|
||||||
yarn add vuepress@next vuepress-theme-plume
|
yarn add vuepress@next vuepress-theme-plume
|
||||||
```
|
```
|
||||||
|
|
||||||
@ -150,7 +150,7 @@ yarn add vuepress@next vuepress-theme-plume
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab .vuepress/config.ts
|
@tab .vuepress/config.ts
|
||||||
|
|
||||||
```ts
|
```ts :no-line-numbers
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { plumeTheme } from 'vuepress-theme-plume'
|
import { plumeTheme } from 'vuepress-theme-plume'
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ export default defineUserConfig({
|
|||||||
|
|
||||||
### 更新记录
|
### 更新记录
|
||||||
|
|
||||||
[Changelog](/changelog/)
|
[Changelog](./changelog.md)
|
||||||
|
|
||||||
### 贡献者
|
### 贡献者
|
||||||
|
|
||||||
|
|||||||
@ -28,7 +28,7 @@ tags:
|
|||||||
|
|
||||||
- ### 新建文件夹并进入目录
|
- ### 新建文件夹并进入目录
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
mkdir my-blog
|
mkdir my-blog
|
||||||
cd my-blog
|
cd my-blog
|
||||||
```
|
```
|
||||||
@ -38,21 +38,21 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab pnpm
|
@tab pnpm
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
git init
|
git init
|
||||||
pnpm init
|
pnpm init
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab yarn
|
@tab yarn
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
git init
|
git init
|
||||||
yarn init
|
yarn init
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab npm
|
@tab npm
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
git init
|
git init
|
||||||
npm init
|
npm init
|
||||||
```
|
```
|
||||||
@ -66,7 +66,7 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab pnpm
|
@tab pnpm
|
||||||
|
|
||||||
```sh
|
```sh :no-line-numbers
|
||||||
# 安装 vuepress
|
# 安装 vuepress
|
||||||
pnpm add -D vuepress@next vue
|
pnpm add -D vuepress@next vue
|
||||||
# 安装 主题和打包工具
|
# 安装 主题和打包工具
|
||||||
@ -75,7 +75,7 @@ tags:
|
|||||||
|
|
||||||
@tab yarn
|
@tab yarn
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
# 安装 vuepress
|
# 安装 vuepress
|
||||||
yarn add -D vuepress@next
|
yarn add -D vuepress@next
|
||||||
# 安装 主题和打包工具
|
# 安装 主题和打包工具
|
||||||
@ -84,7 +84,7 @@ tags:
|
|||||||
|
|
||||||
@tab npm
|
@tab npm
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
# 安装 vuepress
|
# 安装 vuepress
|
||||||
npm i -D vuepress@next
|
npm i -D vuepress@next
|
||||||
# 安装 主题和打包工具
|
# 安装 主题和打包工具
|
||||||
@ -103,7 +103,7 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab package.json
|
@tab package.json
|
||||||
|
|
||||||
``` json
|
``` json :no-line-numbers
|
||||||
{
|
{
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vuepress dev docs",
|
"dev": "vuepress dev docs",
|
||||||
@ -121,7 +121,7 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab .gitignore
|
@tab .gitignore
|
||||||
|
|
||||||
``` txt
|
``` txt :no-line-numbers
|
||||||
node_modules
|
node_modules
|
||||||
.temp
|
.temp
|
||||||
.cache
|
.cache
|
||||||
@ -129,7 +129,7 @@ tags:
|
|||||||
|
|
||||||
@tab sh
|
@tab sh
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
echo 'node_modules' >> .gitignore
|
echo 'node_modules' >> .gitignore
|
||||||
echo '.temp' >> .gitignore
|
echo '.temp' >> .gitignore
|
||||||
echo '.cache' >> .gitignore
|
echo '.cache' >> .gitignore
|
||||||
@ -142,7 +142,7 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab docs/.vuepress/config.js
|
@tab docs/.vuepress/config.js
|
||||||
|
|
||||||
``` ts
|
``` ts :no-line-numbers
|
||||||
import { defineUserConfig } from 'vuepress'
|
import { defineUserConfig } from 'vuepress'
|
||||||
import { viteBundler } from '@vuepress/bundler-vite'
|
import { viteBundler } from '@vuepress/bundler-vite'
|
||||||
import { plumeTheme } from 'vuepress-theme-plume'
|
import { plumeTheme } from 'vuepress-theme-plume'
|
||||||
@ -170,7 +170,7 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab README.md
|
@tab README.md
|
||||||
|
|
||||||
``` md
|
``` md :no-line-numbers
|
||||||
---
|
---
|
||||||
home: true
|
home: true
|
||||||
---
|
---
|
||||||
@ -183,19 +183,19 @@ tags:
|
|||||||
::: code-tabs
|
::: code-tabs
|
||||||
@tab pnpm
|
@tab pnpm
|
||||||
|
|
||||||
```sh
|
```sh :no-line-numbers
|
||||||
pnpm dev
|
pnpm dev
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab yarn
|
@tab yarn
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
yarn dev
|
yarn dev
|
||||||
```
|
```
|
||||||
|
|
||||||
@tab npm
|
@tab npm
|
||||||
|
|
||||||
``` sh
|
``` sh :no-line-numbers
|
||||||
npm run dev
|
npm run dev
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -30,7 +30,7 @@ tags:
|
|||||||
|
|
||||||
由于文件夹名称将作为分类名称,且不在主题配置中进行排序配置,对于有排序需要的场景,使用以下规则进行命名
|
由于文件夹名称将作为分类名称,且不在主题配置中进行排序配置,对于有排序需要的场景,使用以下规则进行命名
|
||||||
|
|
||||||
``` ts
|
``` ts :no-line-numbers
|
||||||
const dir = /\d+\.[\s\S]+/
|
const dir = /\d+\.[\s\S]+/
|
||||||
// 即 数字 + . + 分类名称
|
// 即 数字 + . + 分类名称
|
||||||
// 如: 1.前端
|
// 如: 1.前端
|
||||||
@ -40,7 +40,7 @@ const dir = /\d+\.[\s\S]+/
|
|||||||
|
|
||||||
__example:__
|
__example:__
|
||||||
|
|
||||||
``` txt
|
``` txt :no-line-numbers
|
||||||
.{sourceDir}
|
.{sourceDir}
|
||||||
- 1.前端
|
- 1.前端
|
||||||
- 1.html
|
- 1.html
|
||||||
|
|||||||
@ -92,3 +92,7 @@ export default defineClientConfig({
|
|||||||
--vp-c-text-3: rgba(235, 235, 245, 0.38);
|
--vp-c-text-3: rgba(235, 235, 245, 0.38);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
::: tip
|
||||||
|
主题提供了 [主题颜色工具](../../tools/custom-theme.md) , 你可以使用它来创建自定义颜色。
|
||||||
|
:::
|
||||||
|
|||||||
@ -17,7 +17,7 @@ lastUpdated: false
|
|||||||
搜索 `@property`,点击 `#` 会跳转到 `https://caniuse.com/mdn-css_at-rules_property`,
|
搜索 `@property`,点击 `#` 会跳转到 `https://caniuse.com/mdn-css_at-rules_property`,
|
||||||
可以直接复制 `mdn-css_at-rules_property` ,粘贴到 markdown 文件中:
|
可以直接复制 `mdn-css_at-rules_property` ,粘贴到 markdown 文件中:
|
||||||
|
|
||||||
```md
|
```md :no-line-numbers
|
||||||
@[caniuse](mdn-css_at-rules_property)
|
@[caniuse](mdn-css_at-rules_property)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user