安装node.js和npm
sudo apt install nodejs |
新版本安装(hexo不支持)curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash - &&\
sudo apt-get install -y nodejs
nvm指定版本安装proxychains4 wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | proxychains4 bash
source ~/.zshrc
export NVM_NODEJS_ORG_MIRROR=https://npm.taobao.org/mirrors/node/
export NVM_IOJS_ORG_MIRROR=http://npm.taobao.org/mirrors/iojs
nvm install 12.16.2
nvm use 12.16.2
换源sudo npm install -g nrm
nrm ls
nrm use taobao
安装Hexo
`sudo npm install -g hexo-cli` |
安装git
sudo apt install git |
配置github-git
git config --global user.name "your github name" |
填写github账户名和注册邮箱
创建公钥
ssh-keygen -t rsa -C "example@email.com" |
将在~/.ssh/文件夹下生成github_name 和 github_name.pub两个文件,
gedit github_name.pub |
打开github登录,点击头像setting -> SSH and GPG keys,将.pub 文件内容复制到 SSH keys中
测试是否设置成功ssh git@github.com
验证
npm install hexo-deployer-git --save |
测试是否成功
加速
npm i hexo-offline-popup --save |