Hexo 教程
hexo 简介
Hexo是高效的静态站点生成框架,它基于Node.js。通过Hexo,你可以直接使用Markdown语法来撰写博客。
官网 中文
hexo 安装
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| npm install hexo-cli -g
hexo init blog
npm install
npm install --save hexo-renderer-sass
hexo server
hexo g
hexo s --watch
hexo clean
|
hexo 部署
1 2 3 4 5 6 7
| npm install hexo-deployer-git --save
rm -rf .deploy_git hexo g hexo d
|
ubuntu 安装
环境介紹
主机: ubuntu 18.04
安裝依賴
1 2 3 4
| sudo apt-get install nodejs sudo apt install npm sudo apt install git npm install -g hexo
|
hexo 創建
1 2 3 4 5
| mkdir hexo_init cd hexo_init hexo init hexo g hexo s
|
登录 http://localhost:4000 查看效果
下載主題
1 2 3
| git clone https://github.com/tufu9441/maupassant-hexo.git themes/maupassant npm install hexo-renderer-pug --save npm install hexo-renderer-sass --save
|
修改yml文件
1 2 3 4 5 6 7
| theme: maupassant
deploy: type: git repository: https://github.com/Leo-youngs/Leo-youngs.github.io branch: master message: update
|
生成静态文件
更多信息: Generating
发布
更多信息: Deployment
其他命令
1 2 3 4 5 6 7 8 9
| hexo new page categories hexo new page tags
hexo clean && hexo g && hexo s
hexo new mxnet
|
主题库
Themes