Skip to main content

Getting Started

About 1 min

Getting Started

Note

VuePress v2 is currently in beta stage. It's ready to be used for building your site, but the config and API are not stable enough, which is likely to have breaking changes between minor releases. So make sure to read the changelogopen in new window carefully each time you upgrade a beta version.

Prerequisites

Tips

Manual Installation

This section will help you build a basic VuePress documentation site from ground up. If you already have an existing project and would like to keep documentation inside the project, start from Step 3.

  • Step 1: Create and change into a new directory
mkdir vuepress-starter
cd vuepress-starter
  • Step 2: Initialize your project
git init
pnpm init
  • Step 3: Install VuePress locally
pnpm add -D vuepress@next @vuepress/client@next vue
{
  "scripts": {
    "docs:dev": "vuepress dev docs",
    "docs:build": "vuepress build docs"
  }
}
  • Step 5: Add the default temp and cache directory to .gitignore file
echo 'node_modules' >> .gitignore
echo '.temp' >> .gitignore
echo '.cache' >> .gitignore
  • Step 6: Create your first document
mkdir docs
echo '# Hello VuePress' > docs/README.md
  • Step 7: Serve the documentation site in the local server
pnpm docs:dev

VuePress will start a hot-reloading development server at http://localhost:8080open in new window. When you modify your markdown files, the content in the browser will be auto updated.

By now, you should have a basic but functional VuePress documentation site. Next, learn about the basics of configuration in VuePress.