內容簡介
總結:Version Control Your Content 外掛提供了使用 Git 服務替代 WP 原生的修訂功能的選擇。它能在各種編輯器與自訂設定頁面中進行版本控制,同時運作原理為將資料提交到 Git 儲存庫,以最小負擔運作於伺服器。
1. 這個外掛提供了替代 WP 原生修訂功能的選擇嗎?
- 是的,Version Control Your Content 外掛使用 Git 服務作為版本控制的替代方案。
2. 使用這個外掛需要哪些條件?
- 使用前需擁有 GitHub 帳號及私人儲存庫,建議也擁有 GitHub 細緻存取權杖。
3. 這個外掛目前提供版本控制的地方有哪些?
- 可在 Gutenberg、Classic Editor、Customizer 的 Additional CSS 和 WP Admin 的 Default Settings 頁面上進行版本控制。
4. 這個外掛的運作方式是怎樣的?
- 當提交任何 HTML 表單時,透過 JavaScript 捕捉表單數據,將其轉換為 JSON 格式後透過 commit 傳送到 Git 儲存庫。
5. 這個外掛未來計劃增加哪些功能?
- 整合與 Elementor、Divi、Beaver Builder、WPBakery 等頁面構建器,以及與 WooCommerce、BuddyPress、bbPress、WPML 等進行整合。
外掛標籤
開發者團隊
② 後台搜尋「Version Control Your Content」→ 直接安裝(推薦)
原文外掛簡介
The Version Control Your Content plugin provides an alternative to the native WP Revisions feature using Git services.
Requirements
A GitHub account. If you don’t have one, you can create one here.
A GitHub private repository. If you don’t have one, you can create one here.
(Optional but highly recommended) A GitHub fine-grained personal access token. If you don’t have one, you can create one here.
This plugin provides an option for version control in the following places for now:
Block Editor (Gutenberg)
Classic Editor
Additional CSS in the Customizer
Default Settings pages in WP Admin
On all supported pages, you will see a “Version Control” box, and you can activate or deactivate it for that page. It will also show you the real-time GitHub API usage in the top admin bar.
This solution will put minimal load on your server because there will be no database entries, no complex SQL operations, and only simple JavaScript-based API calls to external Git services.
How it works behind the scenes?
When you submit any HTML form, such as saving a post, it captures the form data via JavaScript before sending it to the server backend.
It sanitizes the data and converts it to JSON format (if needed).
It sends that JSON or HTML data to your Git repository via a commit.
In this way, all your changes will be new commits in your Git repo in related JSON or HTML files.
In the commits box, a list of all commits will be shown. It will also provide an option to view the changes or revert to that version.
Planned Upcoming Features
Currently, I have developed it for three views as described above, and the following features will be added in the future:
Integration with page builders like Elementor, Divi, Beaver Builder, WPBakery, etc.
Integration with WooCommerce
Integration with BuddyPress
Integration with bbPress
Integration with WPML, etc.
