github
new repository 命名为 lichen0921.github.io
以 可以访问这个代码仓库.
新建一个 CNAME 文件,内容为
www.launchercher.com
Hexo
环境需要 Git 和 Node.js
安装Hexo
npm install -g hexo
NPM全称是Node Package Manager,是NodeJs的包管理器
初始化Hexo
mkdir launcherchercd launchercherhexo init
生成和预览
hexo generatehexo server
或者简称
hexo ghexo s
用浏览器打开http://localhost:4000 预览博客
发布到github
修改_config.yml
deploy: type: github repository: https://github.com/lichen0921/lichen0921.github.io.git
发布
hexo deploy
简称
hexo d
bug处理
npm install hexo-renderer-ejs --savenpm install hexo-renderer-stylus --savenpm install hexo-renderer-marked --save
更换pacman主题
git clone https://github.com/A-limon/pacman.git themes/pacman
然后将_config.yml中的theme修改为:pacman
同时修改E:\launchercher\hexo\node_modules\hexo-renderer-stylus\index.js
stylus ... .set('compress', true)
如果发现没效果,可以
rm -rf publichexo cleanrm -rf .deployhexo ghexo shexo d
Create a new post
bash $ hexo new "My New Post"
More info:
Run server
bash $ hexo server
More info:
Generate static files
bash $ hexo generate
More info:
Deploy to remote sites
bash $ hexo deploy
More info:
域名解析
记录类型 主机记录 记录值 A @ 103.245.222.133 CNAME www lichen0921.github.io