参考: https://hexo.io/zh-cn/docs/setup
https://qlzhu.github.io/blog/51941/
安装npm
1
| choco install nodejs-lts -y
|
安装hexo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| npm install hexo-cli -g npm install hexo
npm install hexo-deployer-git --save
npm install hexo-server --save
npm install hexo-generator-searchdb --save
npm install hexo-wordcount --save
npm install hexo-asset-img --save
|
建站
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| git clone https://github.com/omaidb/omaidb.github.io.git
cd omaidb.github.io
mkdir blog && cd blog hexo init npm install
git add -A git commit -m 'hexo init' git push
|
新建一篇文章
https://hexo.io/zh-cn/docs/commands
1 2 3 4 5 6 7 8
| hexo new [layout] <title>
hexo new "文章标题"
source\_posts\hexo部署gitpage.md
|
创建一个about me页面
1
| hexo new page --path about/me "About me"
|
生成静态文件
1 2 3 4 5 6 7 8
| hexo g
hexo g -w
hexo g -d
|
发表草稿
1 2 3 4
| hexo publish [layout] <filename>
hexo publish "文章标题"
|
预览
常见问题:部署后,网页仍未更新
1 2 3 4
|
hexo clean && hexo g -d && hexo s
|
其他美化
参考: hexo-next主题配置
hexo不显示图片
找好久,有让装插件的,有改Typora图片路径的,但是都不奏效哈.头疼,还没解决.