build blog with hexo on github

Referece

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# 安装Homebrew
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
echo 'export PATH="/usr/local/bin:$PATH"' >> ~/.bash_profile
brew doctor
# 安装Xcode,app store安装
# 安装Nodejs
brew install node
# 安装git
brew install git
# 安装hexo
npm install -g hexo-cli

Creat a new repository on github with name ‘yourname.github.io’, then:

1
2
3
4
5
cd ~/Public
git clone https://github.com/yourname/yourname.github.io.git
hexo init yourname.github.io
cd yourname.github.io
npm install hexo-deployer-git --save

deployment

1
2
hexo generate && hexo server # hgs
hexo generate && hexo deploy # hgd

new article

1
hexo new "new article name"

edit your article in the source/_posts/ directory

Write markdown files with atom

用 ⇧⌃m 呼出预览

markdown语法

html字符实体在markdown里表示特殊符号

比如 |符号 的表示方式有,可用在markdown插入表格中:

1
2
3
4
5
|
|
|
|
|

字符实体参考手册

ASCII

符号

颜色代码

颜色名

Google Material design