Scaffolding a VuePress project
In the desired folder, run the following command to start the VuePress site generator:
npx create-vuepress-site
# yarn create vuepress-site
Download the Dockerfile:
mkdir docker
cd docker
wget https://github.com/vuepress/create-vuepress-site/raw/master/docker/Dockerfile
Build the Docker images:
docker build -t vuepress-site-generator:latest .
Make a folder where you want to generate the Service:
mkdir service
cd service
Run the generator from image to generate service:
docker run -it --rm -v $PWD:/home/vuepress/app vuepress-site-generator
Run and attach interactive shell to the generator docker container to work from inside the running container:
docker run -it --rm -v $PWD:/home/vuepress/app vuepress-site-generator /bin/bash
This will create a scaffolded documentation site in the docs
directory that is enclosed from the rest of the folder.
# Navigate into newly scaffolded docs directory
cd docs
# Install dependencies
npm install
# yarn install
# Start local dev server
npm run dev
By default, you should now see your scaffolded VuePress docs site at https://localhost:8080!
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
create-vuepress-site
exists due to the previous work of:
-
create-umi (Direct reuse of scaffolding functions of the library.)