Add Live Preview Blueprint for WordPress.org#4080
Open
adamziel wants to merge 1 commit intojohngodley:trunkfrom
Open
Add Live Preview Blueprint for WordPress.org#4080adamziel wants to merge 1 commit intojohngodley:trunkfrom
adamziel wants to merge 1 commit intojohngodley:trunkfrom
Conversation
Hi! I noticed that Redirection doesn't have a Live Preview button on its WordPress.org page yet, so I created a blueprint configuration for it. ## About Live Preview The [Live Preview feature](https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/) allows users to try plugins directly in their browser without installing anything, powered by [WordPress Playground](https://playground.wordpress.net/). This can significantly increase user engagement and conversions. **Learn more:** - [Plugin Handbook - Previews and Blueprints](https://developer.wordpress.org/plugins/wordpress-org/previews-and-blueprints/) - [WordPress Playground Documentation](https://wordpress.github.io/wordpress-playground/) ## What's Included This PR adds `.wordpress-org/blueprints/blueprint.json` which configures the preview to: - Install and activate Redirection - Log users in automatically - Direct them to the Redirection management page - Import demo redirects (301 and 302 examples) - Create target pages to demonstrate working redirects ## Testing the Blueprint You can test this blueprint right now in WordPress Playground (before merging): **[▶️ Try it in Playground](https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fraw.githubusercontent.com%2Fjohngodley%2Fredirection%2Fadd-wordpress-playground-blueprint%2F.wordpress-org%2Fblueprints%2Fblueprint.json)** This lets you see exactly how users will experience the Live Preview! ## How to Enable After merging this PR and syncing to your WordPress.org SVN repository at `/assets/blueprints/blueprint.json`: 1. Log in to your WordPress.org account 2. Go to [your plugin's Advanced page](https://wordpress.org/plugins/redirection/advanced/) 3. Scroll to **"Toggle Live Preview"** 4. Set the preview to **"public"** The Live Preview button will then appear on your plugin page! You can also test before enabling publicly by adding `?preview=1` to your plugin URL: https://wordpress.org/plugins/redirection/?preview=1 ## Note on SVN Deployment Since this repository uses a build process, you'll need to ensure the `.wordpress-org` directory is deployed to SVN's `/assets` directory. This can be done by either: 1. **Option A (Recommended):** Update the `release` script in `package.json` to include the `.wordpress-org` directory: ```bash cp -R .wordpress-org release/ ``` 2. **Option B:** Manually copy `.wordpress-org` to the SVN `assets/` directory after running `yarn dist:svn`: ```bash yarn dist:svn cd svn mkdir -p assets/blueprints cp ../../../.wordpress-org/blueprints/blueprint.json assets/blueprints/ svn add assets/blueprints/blueprint.json svn ci ``` ## Customization Feel free to customize the blueprint to better showcase your plugin's features. You can: - Change the landing page - Add demo content or sample data - Configure specific PHP/WordPress versions - Add setup steps See the [Blueprint documentation](https://wordpress.github.io/wordpress-playground/blueprints-api/index) for all available options. --- Let me know if you'd like any adjustments to better showcase Redirection!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi! I noticed that Redirection doesn't have a Live Preview button on its WordPress.org page yet, so I created a blueprint configuration for it.
About Live Preview
The Live Preview feature allows users to try plugins directly in their browser without installing anything, powered by WordPress Playground. This can significantly increase user engagement and conversions.
Learn more:
What's Included
This PR adds
.wordpress-org/blueprints/blueprint.jsonwhich configures the preview to:Testing the Blueprint
You can test this blueprint right now in WordPress Playground (before merging):
This lets you see exactly how users will experience the Live Preview!
How to Enable
After merging this PR and syncing to your WordPress.org SVN repository at
/assets/blueprints/blueprint.json:The Live Preview button will then appear on your plugin page!
You can also test before enabling publicly by adding
?preview=1to your plugin URL: https://wordpress.org/plugins/redirection/?preview=1Note on SVN Deployment
Since this repository uses a build process, you'll need to ensure the
.wordpress-orgdirectory is deployed to SVN's/assetsdirectory. This can be done by either:Option A (Recommended): Update the
releasescript inpackage.jsonto include the.wordpress-orgdirectory:bash cp -R .wordpress-org release/Option B: Manually copy
.wordpress-orgto the SVNassets/directory after runningyarn dist:svn:bash yarn dist:svn cd svn mkdir -p assets/blueprints cp ../../../.wordpress-org/blueprints/blueprint.json assets/blueprints/ svn add assets/blueprints/blueprint.json svn ciCustomization
Feel free to customize the blueprint to better showcase your plugin's features. You can:
See the Blueprint documentation for all available options.
Let me know if you'd like any adjustments to better showcase Redirection!