Hexo在多个电脑上使用

最近想在Ubuntu上使用hexo,因为我是用Dropbox来同步文件的,所以我的hexo下的文件都同步到了我系统中,这样只需要先安装node.js,git,npm.

Ubuntu上安装node.js:

sudo apt-get update  
sudo apt-get install -y python-software-properties software-properties-common  
sudo add-apt-repository ppa:chris-lea/node.js  
sudo apt-get update  
sudo apt-get install nodejs

git和npm安装:

sudo apt-get install git
sudo apt-get install npm

然后再安装hexo,注意,一定要sudo,不然因为权限问题安装会失败:

sudo npm install -g hexo

然后安装模块:

sudo npm install

然后就可以切换到hexo路径下使用了。