Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

Welcome to my first Hexo! If you get any problems when using Hexo, you can ask me on GitHub.

HOW TO How to start your own HEXO blog

安装Node.js

此次所有内容都在nodejs的环境下搭建
nodejs
检测是否安装成功

1
$ node -v

安装git

git

安装hexo

1
$ npm install -g hexo-cli

初始化hexo文件夹

1
2
3
4
5
6
7
$ mkdir blog
$ hexo init blog
$ cd blog
$ npm install
$ hexo clean
$ hexo g
$ hexo s

此时进入4000端口就能访问到默认界面

连接到github

创建以 github名.github.io 形式的库
并通过

1
2
3
4
5
$ npm install hexo-deployer-git --save    #安装依赖
$ git config --global user.name "GitHub 用户名"
$ git config --global user.email "GitHub 邮箱"
$ ssh-keygen -t rsa -C "GitHub 邮箱" #将得到的ssh加入到github主页
$ ssh -T git@github.com #显示 “Hi xxx! You've successfully……” 即连接成功

评论