The login
registered
Write an article
Home page
Download the APP

Vuepress is quickly deployed to GitHub for immediate access

Nic_Y

Vuepress is quickly deployed to GitHub for immediate access

Vuepress is quickly deployed to GitHub for immediate access

The environment

Vuepress version 1.0.0

Prepare our Vuepress website

First you should create a Vuepress project

First we need to create a folder




Folder. PNG

In the folder, open CMD or PowerShell

// The overall vuePress structure is constructed in the folder yarn Create vuepressCopy the code


Vuepress provides two templates. PNG


Here we take Docs as an example




Vuepress successfully build.png


They’re going to ask us to fill in some information, email, name, description, I’m not going to fill in anything, right




The directory vuepress created for us. PNG


// The installation depends on YARNCopy the code

Then we went to GitHub to create a repository

The repository name must be your GitHub name

The repository name must be your GitHub name

The repository name must be your GitHub name

The repository name must end with.github. IO


Making a nickname. PNG

Create a Git repository. PNG

PNG is created successfully

Go back to vuepress and add the following code to package.json

"Scripts ": {"docs:build": "vuepress build docs",// Added "deploy": "bash deploy.sh"// added}Copy the code

Create a new deploy.sh file at the same level as package.json and write the following code in the file

#! /usr/bin/env sh set -e # generate static file NPM run docs:build # go to the generated folder CD docs/.vuepress/dist git init git add -a Git commit -m 'deploy' # Https://< USERNAME>.github https://github.com/NicCraver/niccraver.github.io.git master cd -Copy the code


package.json.png

deploy.sh.png

Finally, we execute through gitbash

yarn deploy
Copy the code


gitbash.png




gitbash2.png






niccraver.github.io/







The deployment succeeded. PNG

Recommended readingMore highlights

  • VuePress consists of two parts: one is a minimalist static website generator that supports theme development with Vue, and the other is for writing technology… 7reVOR Read 495 Comments 0 Likes 2
  • Local storage in JS stores some information in a location within the domain specified by the current browser (stored on a physical disk). Read 382 Comments 0 Likes 1
  • What is a Git version Management and control tool (VCS)? Distributed version control 2. Coordination of work by multiple developers 3. Effective monitoring of who made changes 4…. Daryl_Z Read 76 Comment 1 Like 2
  • Vuepress is a document page generation tool provided by Vue. Although the blog adaptation is not officially implemented yet, it can be modified with some small configuration files. Mizuka Read 3,949 comments 0 likes 7
  • Hexo + making Pages set up blog tutorial reprinted http://www.cnblogs.com/bxm0927/p/6927340.html probably process: 1…. Read 3,877 comments 7 likes 32