內容簡介
這是一個 WordPress 外掛,可以將內容與 GitHub 儲存庫(或 Jekyll 網站)進行同步
如果您希望能夠協同撰寫 WordPress 網站的內容(或公開展示更改歷史記錄並接受讀者的 pull request 建議)嗎?
您是否想要嘗試玩弄 Jekyll,但希望能夠使用WordPress的舉世聞名的網頁編輯介面而非 Atom?(驚嘆聲!)
現在,您可以實現以上願望!讓我們介紹WordPress GitHub Sync!
WordPress GitHub Sync有三個功能:
允許內容發布者在 GitHub 中版本控制其內容,向讀者公開“誰在何時做出了什麼更改”的記錄
通過 GitHub 的拉取請求模型,使讀者可以向由 WordPress 提供的內容提交建議改進
使非技術寫手可以在WordPress的最佳網頁編輯介面中起草和編輯Jekyll網站
WordPress GitHub Sync還可以實現其他一些很酷的功能:
允許團隊通過 GitHub 協同編寫和編輯帖子(例如拉取请求、問題、評論)
讓您可以通過 GitHub 將兩個不同 WordPress 安裝之間的內容進行同步
讓您可以在“部署”到生產服務器之前將內容進行分段和預覽
它的運作原理
同步操作基於兩個鉤子:
每篇文章同步是針對WordPress的save_post 鉤子而觸發的,它將內容推送到 GitHub
GitHub 的 push 接收 WebHook 呼叫後會觸發所有已更改文件的同步
外掛標籤
開發者團隊
📦 歷史版本下載
原文外掛簡介
A WordPress plugin to sync content with a GitHub repository (or Jekyll site)
Ever wish you could collaboratively author content for your WordPress site (or expose change history publicly and accept pull requests from your readers)?
Looking to tinker with Jekyll, but wish you could use WordPress’s best-of-breed web editing interface instead of Atom? (gasp!)
Well, now you can! Introducing WordPress GitHub Sync!
WordPress GitHub Sync does three things:
Allows content publishers to version their content in GitHub, exposing “who made what change when” to readers
Allows readers to submit proposed improvements to WordPress-served content via GitHub’s Pull Request model
Allows non-technical writers to draft and edit a Jekyll site in WordPress’s best-of-breed editing interface
WordPress GitHub sync might be able to do some other cool things:
Allow teams to collaboratively write and edit posts using GitHub (e.g., pull requests, issues, comments)
Allow you to sync the content of two different WordPress installations via GitHub
Allow you to stage and preview content before “deploying” to your production server
How it works
The sync action is based on two hooks:
A per-post sync fired in response to WordPress’s save_post hook which pushes content to GitHub
A sync of all changed files triggered by GitHub’s push webhook (outbound API call)
