Skip to content

Rockerby/Umbraco.Community.RollbackPreviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Umbraco Rollback Previewer

Downloads NuGet GitHub license

Note

With the release of Umbraco 17 we will be following the Umbraco release version numbers - so RollBackPreviewer v2 is for Umbraco 16 and under, the rest will follow v17, v18 etc

Enhance Umbraco's rollback functionality with visual rollback previews. This extension builds ontop of the existing Umbraco Rollback modal and allows for the JSON diff to be viewed as well as the visual diff. NEW FEATURE! You can now share the preview as a publicly available URL. With configurable outputs for a secret key to lock this down, and have an expiration time on the URL, this is the perfect way to share content with externals.

Visual difference

JSON difference

Installation

Add the package to an existing Umbraco website from nuget. From v1.0.0 you can install the same package on Umbraco 13+.

dotnet add package Umbraco.Community.RollbackPreviewer

Once the package installed it will automatically replace the current Rollback modal within Umbraco.

Important

The Rollback Previewer uses iFrames to function so you may need to adjust X-Frame-Options to see the preview

Configuration

Add the configuration to the appsettings.json file as per below:

  "RollbackPreviewer": {
    // Set to true to enable the shareable button, appearing within the rollback modal
    "EnableFrontendPreviewAuthorisation": true,
    // Set as a string to use as a standard secret key (appended in the query string)
    "FrontendPreviewAuthorisationSecret": "super-secret-key",
    // Set to true to enable the shared URL to be time limited
    "EnableTimeLimitedSecrets": true,
    // Set to expire the link after this many minutes
    "SecretExpirationMinutes": 60
  }

Running locally (v15/v16/v17)

Clone the repository.

Head into the src\Umbraco.Community.RollbackPreviewer\Client and run the following to start the dev server:
npm ci
npm run dev

Open the sln file and run the Umbraco project, or head to the version you want (e.g. src\Umbraco.Community.RollbackPreviewer.TestSite.v17) and run dotnet run, (uSync will automatically import, if not, go import everything) and head to the home node within the CMS. Make a change and go to the Info app and click the Rollback button to see the visual diff.

Check out the Services.RollBackContentFinder for information on the fetching and displaying of the rollbacked version.

Login: [email protected] / 1234567890

Running locally (v13)

Clone the repository.

Head into the src\Umbraco.Community.RollbackPreviewer\wwwroot\App_Plugins\UmbracoCommunityRollbackPreviewer.v13 and edit the files as you like. They are pushed through to the site via RCL and there are no npm tasks to run.

Open the sln file and run the Umbraco project, or head to src\Umbraco.Community.RollbackPreviewer.TestSite.v13 and run dotnet run, (uSync will automatically import, if not, go import everything) and head to the home node within the CMS. Make a change and go to the Info app and click the Rollback button to see the visual diff.

Check out the Services.RollBackContentFinder for information on the fetching and displaying of the rollbacked version.

Login: [email protected] / 1234567890

Contributing

Contributions to this package are most welcome! Please read the Contributing Guidelines.

Check out the project for release / updates here

Acknowledgments

Mike Masey came up with the idea
Matt Brailsford provided the basis for converting internal models
Lotte Pitcher for her amazing Opinionated Starter Kit
Rollback icon created by maswan - Flaticon

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •