wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion
nvm install v10.15.3
编辑: ~/.bashrc,加入:
alias cnpm="npm --registry=https://registry.npm.taobao.org"
#http://stevenshi.me/2017/05/23/ubuntu-hexo/
npm install hexo-cli -g
npm install hexo-server -g
npm install hexo-deployer-git -g
npm install yarn -g
npm install http-server -g
yarn global add serve
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
yarn config set registry https://registry.npm.taobao.org --global
yarn config set disturl https://npm.taobao.org/dist --global
# 初始化
hexo init
yarn install
# Google
yarn add hexo-generator-sitemap
# Baidu
yarn add hexo-generator-baidu-sitemap
# 安装依赖项
yarn install
运行:
hexo s
创建新的文章:
hexo n "文件的名称"