How to use Vuepress or Vitepress into an existing Vue project?

318 views Asked by At

Is there a way of integrate inside a Vue project a Vitepress or Vuepress project?. Is there a way to create system documentation like that created by Vuepress or Vitepress that can be accessed from within the system?

1

There are 1 answers

0
laplacetw On

VitePress can be used on its own, or be installed into an existing project.

In both cases, you can install it with :

npm add -D vitepress

If you are installing VitePress in an existing project alongside other source code, it is recommended to scaffold the site in a nested directory (e.g. ./docs) so that it is separate from the rest of the project.

.
├─ docs
│  ├─ .vitepress
│  │  └─ config.js
│  ├─ api-examples.md
│  ├─ markdown-examples.md
│  └─ index.md
└─ package.json

ref.

  1. https://vitepress.dev/guide/getting-started#installation
  2. https://vitepress.dev/guide/getting-started#file-structure