Writing article with Hexo in another device.

Environment

  • Install git
  • Install node / npm

Copy from Source Folder

1
2
3
4
5
6
_config.yml
.gitignore
package.json
scaffolds/
source/
themes/

Installation

1
2
3
4
5
6
7
8
9
10
11
npm install -g hexo-cli
npm install
npm install hexo-deployer-git --save // 文章部署到 git 的模块
npm install --save hexo-blog-encrypt // 部署文章加密插件
npm uninstall hexo-generator-index --save // 卸载 hexo-generator-index 插件
npm install hexo-generator-index-pin-top --save // 安装 hexo-generator-index-pin-top 插件
npm install hexo-generator-search --save
npm install hexo-generator-searchdb --save // 安装全站搜索插件
npm install hexo-symbols-count-time // 安装文章字数统计
npm install hexo-generator-feed --save // 建立 RSS 订阅
npm install --save hexo-tag-aplayer // 音乐播放插件

Test

1
hexo cl && hexo g && hexo s

Deploy

1
2
3
4
5
6
7
ssh root@server_ip
su git
cd /home/git/.ssh
vim authorized_keys
copy-paste public keys

hexo cl && hexo g -d