Build a HEXO blog!!
install node(nvm)
|
|
change the
npm
mirrors- temporary use
npm --registry https://registry.npm.taobao.org install express
- set in the config
npm config set registry https://registry.npm.taobao.org
- use
cnpm
npm install -g cnpm --registry=https://registry.npm.taobao.org
- temporary use
install HEXO
sudo npm install -g hexo
create Blog folder
|
|
associate with Git
- create a new repo named with
$username.github.io
- back to the directory of the blog, edit the
_config.yaml
file
1 2 3 4
deploy: type: 'git' repository: https://github.com/XXX/XXX.github.io.git branch: master
- generate the static HTML
hexo generate
orhexo g
- config the HTML, and deploy the local blog to Github pages
npm install hexo-deployer-git --save
hexo deploy
orhexo d
- create a new repo named with
Deploy blog
- go the blog directory, execute
hexo new "newblog"
, a new file named newblog.md will apear in the directory [filename]/source/_posts, edit it with vim or typora or… - after editing, push it to github page:
1 2
hexo generate hexo deploy
- go the blog directory, execute
change themes
defalut theme is landscape
, you can choose anyone you like. like Ada
go to the directory of blog, execute:
|
|
then, change the _config.yaml
, change the landscape
to yilia
,after that:
|
|