hexo install

搭建 hexo blog

标签(空格分隔): other


安装 hexo:

mkdir hexo && cd hexo
sudo apt-get install npm
npm install hexo --save
npm install hexo-server --save
npm install hexo-deployer-git --save

tree -L 1
.
├── _config.yml
├── db.json
├── node_modules
├── package.json
├── public
├── scaffolds
├── source
└── themes


js node_modules/hexo/bin/hexo init

本地测试:

js node_modules/hexo/bin/hexo g
js node_modules/hexo/bin/hexo s
http://localhost:4000/

github 测试:

vim _config.yml

deploy:
  type: git
  repo: git@github.com:Wonfee/wonfee.github.io.git
  branch: master

npm install hexo-deployer-git --save
js node_modules/hexo/bin/hexo g
js node_modules/hexo/bin/hexo d

写博客:

js node_modules/hexo/bin/hexo n "My First Post"

编辑生成的 .md文件:

source/_posts/My-First-Post.md
js node_modules/hexo/bin/hexo g
js node_modules/hexo/bin/hexo d

My Home Page

推荐博文编辑工具:
Cmd Markdown
简书