搭建 hexo,在執行 hexo deploy 後,出現 error deployer not found:github 的錯誤

hexo 更新到3.0以後,deploy的type 的github須要改爲githtml

改了以後執行npm install hexo-deployer-git --savegit

而後再部署試試github

 


官網說明: https://hexo.io/zh-cn/docs/deployment.htmlweb

 

 

部署Hexo 提供了快速方便的一鍵部署功能,讓您只需一條命令就能將網站部署到服務器上。npm

$ hexo deploy

在開始以前,您必須先在 _config.yml 中修改參數,一個正確的部署配置中至少要有 type 參數,例如:服務器

deploy:
  type: git

 您可同時使用多個 deployer,Hexo 會依照順序執行每一個 deployer。hexo

deploy:
- type: git
  repo:
- type: heroku
  repo:

 

Git

安裝 hexo-deployer-git網站

$ npm install hexo-deployer-git --save

 修改配置。url

deploy:
  type: git
  repo: <repository url>
  branch: [branch]
  message: [message]

 

參數 描述
repo 庫(Repository)地址
branch 分支名稱。若是您使用的是 GitHub 或 GitCafe 的話,程序會嘗試自動檢測。
message 自定義提交信息 (默認爲 Site updated: {{ now("YYYY-MM-DD HH:mm:ss") }})
相關文章
相關標籤/搜索