跳转至

The guide

The website fork from Hexo. hexojs/hexojs.github.io repository.

How to update the website at another PC (2018)

According to this guide: https://zhuanlan.zhihu.com/p/26625249

Install

  • install npm
$ node -v #check the version of npm
  • and git
  • using git bash here in your PC
$ git config --global user.name "github-username"
$ git config --global user.email "your-github-email"

Add path Variable

  • Right click "my PC"
  • Choose R(the last option)
  • Click Advance, Choose environment variables
  • Add your git directory to PATH, such as E:\Program Files\Git\bin

Generate SSH Key

$ ssh-keygen -t rsa -C "your github email"
  • Just press the enter key 3 times.
  • Open https://github.com/settings/keys
  • Add new SSH Keys
  • Your key should locate at some directory ".ssh", find id_rsa.pub, open with notepad+++, and paste in Github

Install Hexo

  • in git Bash
$ npm install -g hexo-cli
  • creat your website
$ hexo init your_website_directory
  • some command
$ hexo g #g is short for generate
$ hexo d #d is short for deploy
$ hexo server #run the server in your pc
$ hexo clean #clean all cache , and delete the public folder

Deploy your website

  • find _config.yml
deploy:
  type: git
  repo: https://github.com/faystart/NPFML.git
  • install deploy plugin
$ npm install hexo-deployer-git --save
  • now deploy your website to github pages in the root of your website (on your pc)
hexo clean
hexo g
hexo d

Update

This guideline update : 2018/07/06

CC BY 4.0

回到页面顶部