Grav History Plugin
This product is in beta state.
It is available to registered beta testers only.
Saves a history of all page modifications into an embedded Git repository. Provides pages and commands to view and process the historical data.
The Grav History Plugin creates an embedded Git repository inside of your existing Grav project directory.
Each time a page is created, modified, or deleted, the plugin will commit the changes.
Having a history of all page activity will allow you to view changes, compare revisions, restore previous versions, and recover deleted pages.
The location of the repository is <your-project>/git.
You must have Git installed on your webserver.
The Grav Git Plugin will work even if you are already using Git for your project; A separate repository is created just for page revisions.
The plugin adds:
- A View History action to the admin pages list.
- A View History action to the admin page editor.
- A History Administration page located at admin/history.
- /admin/history and /admin/history/admin
- Shows Git plugin actions and status.
Shows a revisions report for the selection. Each revision has
- A link to edit or view the page
- An View Diff action that shows the Git diff information.
- Shows a revisions report for the selected page.
- Shows all Git revisions.
- Shows the last Git commit.
The following commands are added to the Grav CLI console.
- see syncAllPages
bin/plugin history sync
- Syncs all pages in the user directory. Use this command if pages were modified outside the admin plugin.
- Syncs the provided page.
- Deletes the repository.
- Deletes the Git repo and creates a new one.
- Shows the Git log.
- diff($rev1, $rev2)
- Show a diff between 2 revisions.
: Restore deleted pages