1.0.7 • Published 9 months ago
@michalklor/custom-version-view v1.0.7
Custom Version View plugin
This plugin adds some fields to the version view :
Updated At -using relative date Updated by
For example:
Setup
Install the plugin using your node package manager, e.g:
npm add @shefing/custom-version-view
In the payload.config.ts add the following:
plugins: [
...plugins,
versionsPlugin({
excludedCollections: [] //array of collections names to exclude
excludeGlobals:[] //array of globals names to exclude
})
The updated by field in versions relies on the authors-info package.
Collection Configuration
Add the following configuration to enable versions for a collection:
versions: {
drafts: true,
}