Hexo搭建和命令参考
Hexo搭建步骤:
安装Git
安装Node.js
安装Hexo
GitHub创建个人仓库
生成SSH添加到GitHub
将hexo部署到GitHub
设置个人域名
发布文章
安装Git和Node.js,D盘创建WWW,WWW目录下cmd
1
2
3
4npm install hexo-cli -g
hexo init Blog
cd Blog
npm install创建GitHub仓库: https://cyphersun.github.io/
链接GitHub,然后再次确认没有输错
1
2
3
4
5git config --global user.name "CypherSun"
git config --global user.email "84860748@qq.com"
git config user.name
git config user.email创建ssh文件,一直回车就行
1
ssh-keygen -t rsa -C "84860748@qq.com"
在GitHub的setting中,找到SSH keys,点击New SSH key,输入前面在本地电脑生成的id_rsa.pub
输入yes,确定链接GitHub
1
ssh -T git@github.com
Blog目录下cmd
1
2
3
4
5
6
7
8npm install hexo-deployer-git --save
npm install --save hexo-renderer-less hexo-renderer-ejs
git clone https://github.com/miiiku/hexo-theme-flexblock.git ./themes/flexblock
npm i hexo-theme-async@latest
npm install hexo-helper-live2d
npm install live2d-widget-model-hijiki
npm install live2d-widget-model-wanko
npm install hexo-generator-searchdb复制备份的source,scaffolds,_config.yml,_config.flexblock.yml,_config.async.yml到Blog目录下
访问本地:
hexo g
hexo s
访问本地 4000端口上传github:
hexo clean
hexo g
hexo d
访问Github 网址