hexo搭建简单步骤
具体详情请参考hexo文档
安装 node.js
安装 git
安装
hexo npm install -g hexo-cli
初始化 hexo 文件夹
1 | hexo init <folder> |
下载 next 主题 配置next
开启 分类和标签 页
1 | hexo new page categories |
创建新文章
1 | hexo new <layout> title |
开启网站
1 | hexo server -p 4000 [...] |
生成静态页
1 | hexo clean |
发布到github并设置自定义域名
购买域名 设置 A记录(192.30.252.153 or 192.30.252.154) 配置CNAME指向该A记录
创建github仓库 xxxx.github.io
安装 git-deploy
1 | npm install hexo-deployer-git --save |
hexo _config.yml 配置 deploy
1 | deploy: |
创建自定义域名 在source文件夹下创建All type文件 CNAME 填写自定义的域名
一键部署到github并关联自定义域名
1 | hexo deploy or hexo d |