# Getting Started

# Prerequisites

* If your project is using webpack 3.x, you may notice some installation issues with npm. In this case, we recommend using Yarn.

# Quick Start

The fastest way to get your VuePress project set up is to use our create-vuepress-site generator (opens new window), which will help scaffold the basic VuePress site structure for you.

To use it, open up your terminal in the desired directory and run the following command:

yarn create vuepress-site [optionalDirectoryName]
npx create-vuepress-site [optionalDirectoryName]

The command will interactively ask for details to configure your VuePress site’s metadata such as:

  • Project Name
  • Description
  • Maintainer Email
  • Maintainer Name
  • Repository URL

Once this done, a scaffolded documentation site will be created in the docs directory (or custom directory name, if passed) under the current directory.

To see it in action, navigate into newly scaffolded directory, install the dependencies and start the local server:

cd docs
yarn install
yarn dev
cd docs
npm install
npm run dev

# Manual Installation

If you prefer, you can build a basic VuePress documentation site from ground up instead of using the generator mentioned above.

Note: If you already have an existing project and would like to keep documentation inside the project, start from Step 3.

  1. Create and change into a new directory

    mkdir vuepress-starter && cd vuepress-starter
    
  2. Initialize with your preferred package manager

    yarn init
    
    npm init
    
  3. Install VuePress locally

    yarn add -D vuepress
    
    npm install -D vuepress
    
  4. Create your first document

    mkdir docs && echo '# Hello VuePress' > docs/README.md
    
  5. Add helper scripts (opens new window) to package.json

    This step is optional but highly recommended, as the rest of the documentation will assume those scripts being present.

    {
      "scripts": {
        "docs:dev": "vuepress dev docs",
        "docs:build": "vuepress build docs"
      }
    }
    
  6. Serve the documentation site in the local server

    yarn docs:dev
    
    npm run docs:dev
    

    VuePress will start a hot-reloading development server at http://localhost:8080 (opens new window).

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

Once you’re familiar with those concepts mentioned above, learn how to enrich your content with static assets, Markdown extensions and vue components.

And when your documentation site starts to take shape, be sure to read about multi-language support and the deployment guide.