貢獻

我們歡迎你加入 Hexo 的開發。🤗

開發

我們非常歡迎您加入 Hexo 的開發,這份文件將幫助您了解開發流程。

開始之前

請先閱讀 Contributor Covenant Code of Conduct

請遵守以下準則:

此外,Hexo 有 ESLint 設定,因此請務必確認您的貢獻能夠通過 ESLint。

工作流程

  1. Fork hexojs/hexo
  2. 把檔案庫(repository)複製到電腦上,並安裝相依套件。
$ git clone https://github.com/<username>/hexo.git
$ cd hexo
$ npm install
$ git submodule update --init
  1. 新增一個功能分支。
$ git checkout -b new_feature
  1. 開始開發。
  2. 推送(push)分支。
$ git push origin new_feature
  1. 建立一個新的合併申請(pull request)並描述變更。

注意事項

  • 不要修改 package.json 的版本號。
  • 只有在測試通過的情況下您的合併申請才會被核准,在提交前別忘了進行測試。
$ npm test

Updating official-plugins

Also, we welcome PR or issue to official-plugins. 🤗

更新文件

Hexo 文件開放原始碼,您可以在 hexojs/site 找到原始碼。

工作流程

  1. Fork hexojs/site
  2. 把檔案庫(repository)複製到電腦上,並安裝相依套件。
$ npm install hexo-cli -g # If you don't have hexo-cli installed
$ git clone https://github.com/<username>/site.git
$ cd site
$ npm install
  1. 開始編輯文件,您可透過伺服器預覽變更。
$ hexo server
  1. 推送(push)分支。
  2. 建立一個新的合併申請(pull request)並描述變更。

翻譯

  1. source 資料夾中建立一個新的語言資料夾(全小寫)。
  2. source 資料夾中相關的檔案(Markdown 和模板檔案)複製到新的語言資料夾中。
  3. source/_data/language.yml 中新增語言。
  4. themes/navy/languages 複製 en.yml 並命名為語言名稱(全小寫)。

回報問題

當您使用 Hexo 遭遇問題時,可試著在 解決問題 中尋找解答,或是在 GitHubGoogle Group 詢問。若找不到答案,請至 GitHub 回報。

  1. 除錯模式 再執行一次。
  2. 在 GitHub 上提交新 Issue 時,請按照問題模板中的步驟提供除錯資訊和版本資訊。