diff --git a/packages/docs/docs/guide/getting-started.md b/packages/docs/docs/guide/getting-started.md index 8ef1fe7be8..8b839378ff 100644 --- a/packages/docs/docs/guide/getting-started.md +++ b/packages/docs/docs/guide/getting-started.md @@ -1,22 +1,23 @@ # Getting Started -::: warning Prerequisite -VuePress requires [Node.js](https://nodejs.org/en/) >= 8.6. -::: +## Prerequisites + +- [Node.js 10+](https://nodejs.org/en/) +- [Yarn Classic](https://classic.yarnpkg.com/en/) (Optional)\* + +\* _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 setup is to use our create-vuepress tool which will help scaffold the basic VuePress site structure for you. +The fastest way to get your VuePress project setup is to use our [create-vuepress-site generator](https://github.com/vuepressjs/create-vuepress-site/) 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: ```bash -yarn create vuepress [directoryName] -# OR npx create-vuepress [directoryName] +yarn create vuepress-site [optionalDirectoryName] +# OR npx create-vuepress-site [optionalDirectoryName] ``` -You will be prompted to choose which boilerplate you prefer. For most users, the `docs` boilerplate is what you will want. - You will then have the opportunity to configure your VuePress site’s metadata such as: - Project Name @@ -27,35 +28,31 @@ You will then have the opportunity to configure your VuePress site’s metadata Once it is complete, you should see your new VuePress site scaffolded in your directory! :tada: -## Manual Setup +## 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. 1. Create and change into a new directory - ``` bash + ```bash mkdir vuepress-starter && cd vuepress-starter ``` 2. Initialize with your preferred package manager - ``` bash + ```bash yarn init # npm init ``` 3. Install VuePress locally - ``` bash + ```bash yarn add -D vuepress # npm install -D vuepress ``` - ::: warning - We currently recommend using [Yarn](https://classic.yarnpkg.com/lang/en/) instead of npm when installing VuePress into an existing project that has webpack 3.x as a dependency, because npm fails to generate the correct dependency tree in this case. - ::: - 4. Create your first document - ``` bash + ```bash mkdir docs && echo '# Hello VuePress' > docs/README.md ``` @@ -63,7 +60,7 @@ This section will help you build a basic VuePress documentation site from ground This step is optional but highly recommended, the rest of the documentation will assume those scripts being added. - ``` json + ```json { "scripts": { "docs:dev": "vuepress dev docs", @@ -74,7 +71,7 @@ This section will help you build a basic VuePress documentation site from ground 6. Serve the documentation site in the local server - ``` bash + ```bash yarn docs:dev # npm run docs:dev ``` diff --git a/packages/docs/docs/README.md b/packages/docs/docs/index.md similarity index 64% rename from packages/docs/docs/README.md rename to packages/docs/docs/index.md index a381cbca85..dfd22bd56b 100644 --- a/packages/docs/docs/README.md +++ b/packages/docs/docs/index.md @@ -2,7 +2,7 @@ home: true heroImage: /hero.png actionText: Get Started → -actionLink: /guide/ +actionLink: /guide/getting-started.html footer: MIT Licensed | Copyright © 2018-present Evan You --- @@ -24,26 +24,3 @@ footer: MIT Licensed | Copyright © 2018-present Evan You
VuePress generates pre-rendered static HTML for each page, and runs as an SPA once a page is loaded.
- -### As Easy as 1, 2, 3 - -``` bash -# Scaffold VuePress site -yarn create vuepress [directoryName] -# OR npx create-vuepress [directoryName] - -# Navigate to your new VuePress directory -cd [directoryName] - -# Start local dev server -yarn dev -# OR npm run dev - -# Build static files -yarn build -# OR npm run build -``` - -::: warning COMPATIBILITY NOTE -VuePress requires Node.js >= 8.6. -:::