Add a Blueprint for WP.org Live Preview
This PR adds a Blueprint file so that SiteOrigin's Page Builder plugin can have a Live Preview button in the WP.org plugin repo. The Live Preview will load your plugin in the WordPress Playground web app using the provided Blueprint.
According to the WP.org docs:
There are two things required for a plugin preview button to appear to all users:
- A valid blueprint.json file must be provided in a blueprints sub-directory of the plugin’s assets folder.
- The plugin preview must be set to “public” from the plugin’s Advanced view by a committer.
Once those conditions are met, a Live Preview button should appear next to the Download button in the WordPress.org plugin repo, like:
Try this link for an example of the preview.
I work on the WordPress Playground project and have started creating some PRs to propose Live Preview for various plugins. If you have any feedback related to Playground or Live Previews, I would love to hear it.
Note: This Blueprint installs the Vantage theme for use with the plugin. That can be removed or changed if desired.
It looks like I was mistaken about where to place the blueprint.json file. I believe it belongs under the top-level assets directory for the plugin, under assets/blueprints and not under trunk/assets/blueprints.
Perhaps this should have been an issue with an example blueprint.json instead of a PR.
Hi Brandon! Thanks for submitting this. We had seen the previews and wondered how it worked but just didn't get a chance to look into it yet. So we really appreciate you setting this up.
Regarding where to put the blueprint.json file, I had a look at Simple Page Ordering (as that has the button) and it's present in the assets directory, not trunk. We may still end up merging this in a . dot directory (likely .assets) just so it's versioned still. We'll look more into the Blueprint options though before proceeding.
Thanks again for submitting this!
That's great! In case it helps, here is a reference for the Blueprint data format: https://wordpress.github.io/wordpress-playground/blueprints/data-format
Thanks again for submitting this @brandonpayton. :)
@AlexGStapleton, nice! Thank you for fixing this up and merging. :)