The fastest way to get your project set up is to use our quick start guide, which will help scaffold the basic structure for you.
To use it, open up your terminal in the desired directory and run the following command:
yarn create sandocs [yourprojectname]
The command will interactively ask for details to configure your site’s metadata.
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:
If you prefer, you can build a basic 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.
mkdir starter &&
cd starter
Create and change into a new directory
yarn init
Initialize with your preferred package manager
yarn add -D sandocs
Add helper scripts to package.json
This step is optional but highly recommended, as the rest of the documentation will assume those scripts being present.
yarn docs:dev
Serve the documentation site in the local server.
It will start a hot-reloading development server at http://localhost:8080 .
By now, you should have a basic but functional documentation site. Next, learn about 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 components.
And when your documentation site starts to take shape, be sure to read about multi-language support and the deployment guide.