1,用github建立静态博客选用哪个框架, hexo & jekyll ?
参考:静态博客框架之Hexo & Jekyll
2,使用hexo 搭建博客:
参考:用hexo极速搭建博客
3,安装过程遇到问题
(1)npm install -g hexo (卡住不动问题解决)
参考:HEXO 趟坑笔记
(2)hexo server #开启预览访问端口(默认端口4000,’ctrl + c’关闭server)
我设置的不一致,所以本地预览404,修改 ycyangchun.git.io 后 localhost:4000 成功。
(3)hexo init 提示不兼容,
公司提供电脑环境 win64位,git 却安装的是32位 出现问题。
4,常用命令
每次部署的步骤,可按以下三步来进行。
1,hexo clean
2,hexo generate
3 ,hexo deploy
一些常用命令:
hexo new “postName” #新建文章
hexo new page “pageName” #新建页面
hexo generate #生成静态页面至public目录
hexo server #开启预览访问端口(默认端口4000,’ctrl + c’关闭server)
hexo deploy #将.deploy目录部署到GitHub
hexo help # 查看帮助
hexo version #查看Hexo的版本