Adds a widget and REST endpoint for the purpose of displaying post revisions inline on the frontend.
This widget allows visitors to easily diff posts against their earlier revisions, displaying diffs of HTML inline.
It should be plug and play: Just add the widget to a sidebar that will appear on a page or post. It will detect everything it needs. If you have more complex needs, the code is heavily documented and includes many filters to modify behavior. If the widget's design doesn't suit your purposes, its class is easily extendable, with methods for generating all of the necessary HTML.
This plugin requires a small amount of JS and CSS in order to work properly, and these must be built on deployment. To ensure a tagged release includes these built assets, follow the process below for each release:
- Merge all PRs to be included in the release into
- Open a PR to bump the version numbers in
hm-post-history.phpto the next appropriate version
- Once the PR is merged, create a tag on
mainwith the version number, e.g.
- GitHub Actions should auto-build the frontend assets and reset that tag to push to the bundled code
Check the build output in the Actions tab to see whether it works or not.
To test the plugin on a deployed instance via composer, register the repository as a VCS source, and set your
humanmade/hm-post-history dependency to track the
dev-develop-built branch source.
Merge PRs which require development testing into the
develop branch, and they will be automatically built and pushed to that
develop-built branch using a GitHub Action.
If code which is not intended for release ends up on
develop, force-reset both
develop-built to match the latest