VitePress

lishihuan小于 1 分钟

VitePress

node 需要至少 > 14.18.0

https://vitepress.vuejs.org/guide/getting-startedopen in new window

1. 安装VitePress

1.1 初始化

创建文件夹,然后执行 init

yarn init

1.2 本地安装 VitePress

yarn add --dev vitepress vue

1.3 创建首页

 docs/index.md

1.4 在 package.json.添加一些script


  "scripts": {
    "docs:dev": "vitepress dev docs",
    "docs:build": "vitepress build docs",
    "docs:serve": "vitepress serve docs"
  }