wangchongwei / blog

個人博客文章紀錄代碼

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

安装NVM

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

安装nodejs

安装

nvm install v10.15.3

配置

编辑: ~/.bashrc,加入:

alias cnpm="npm --registry=https://registry.npm.taobao.org"

安装hexo

安装

#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

blog配置

新项目时创建

# 初始化
hexo init 
yarn install
# Google 
yarn add hexo-generator-sitemap
# Baidu
yarn add hexo-generator-baidu-sitemap

已有的项目

# 安装依赖项
yarn install

运行:

hexo s

创建新的文章:

hexo n "文件的名称"

About

個人博客文章紀錄代碼

License:Apache License 2.0


Languages

Language:HTML 87.8%Language:JavaScript 7.4%Language:Stylus 2.1%Language:CSS 1.3%Language:EJS 0.9%Language:Pug 0.5%Language:CoffeeScript 0.0%Language:Batchfile 0.0%Language:Shell 0.0%