多PC同步
- master分支
修改_config.yml
type: git
repo: https://github.com/username/username.github.io.git
branch: master
-
hexo分支簡單的說就是把Hexo環(huán)境push到hexo分支
流程:
- 創(chuàng)建倉庫,http://CrazyMilk.github.io
- 創(chuàng)建兩個分支:master 與 hexo
- 設(shè)置hexo為默認(rèn)分支(因為我們只需要手動管理這個分支上的Hexo網(wǎng)站文件)
- 使用git clonegit@github.com:CrazyMilk/CrazyMilk.github.io.git拷貝倉庫
- 在本地http://CrazyMilk.github.io文件夾下通過Git bash依次執(zhí)行npm install hexo、hexo init、npm install 和 npm install hexo-deployer-git(此時當(dāng)前分支應(yīng)顯示為hexo)
- 修改_config.yml中的deploy參數(shù),分支應(yīng)為maste
- 依次執(zhí)行g(shù)it add .、git commit -m "..."、git push origin hexo提交網(wǎng)站相關(guān)的文件
- 執(zhí)行hexo g -d生成網(wǎng)站并部署到GitHub上。
更換主題
- _config.yml 修改 theme: next
- 主題目錄下找到_config.yml也可以進(jìn)行修改
- 新生成page
hexo new page tags 生成標(biāo)簽頁 路徑
hexo new page categories 生成分類頁面
參考:使用Hexo+Github一步步搭建屬于自己的博客(基礎(chǔ))
參考:hexo 修改主題