mirror of https://github.com/vuejs/vitepress
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1.3 KiB
1.3 KiB
Deploying
The following guides are based on some shared assumptions:
- You are placing your docs inside the
docs
directory of your project; - You are using the default build output location (
.vitepress/dist
); - VitePress is installed as a local dependency in your project, and you have setup the following npm scripts:
{
"scripts": {
"docs:build": "vitepress build docs",
"docs:serve": "vitepress serve docs"
}
}
Building The Docs
You may run yarn docs:build
command to build the docs.
$ yarn docs:build
By default, the build output will be placed at .vitepress/dist
. You may deploy this dist
folder to any of your preferred platforms.
Testing The Docs Locally
Once you've built the docs, you may test them locally by running yarn docs:serve
command.
$ yarn docs:build
$ yarn docs:serve
The serve
command will boot up local static web server that serves the files from .vitepress/dist
at http://localhost:3000. It's an easy way to check if the production build looks OK in your local environment.
You may configure the port of the server py passing --port
flag as an argument.
{
"scripts": {
"docs:serve": "vitepress serve docs --port 8080"
}
}
Now the docs:serve
method will launch the server at http://localhost:8080.