Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to build a theme demo with WP Playground blueprints #244

Open
justintadlock opened this issue Mar 25, 2024 Discussed in #196 · 7 comments
Open

How to build a theme demo with WP Playground blueprints #244

justintadlock opened this issue Mar 25, 2024 Discussed in #196 · 7 comments
Assignees

Comments

@justintadlock
Copy link

Note: This topic was previously approved, but it has now been split from the existing ticket, which covers a more general overview/introduction: #198

Discussed in #196

Originally posted by justintadlock January 3, 2024
One of the most painful experiences (at least in my opinion) is managing live demos to showcase your new Wordpress theme to the world. You usually need to set up and maintain a multisite instance for multiple themes. And, it becomes more complex if you want to give potential users access to the admin to actually explore it. It's a headache and management nightmare.

What if you didn't need to do all of that?

That's where WordPress Playground comes in, especially its Blueprints API: https://wordpress.github.io/wordpress-playground/blueprints-api/index

You can easily provide a demo (even multiple demos with their own configurations) by simply providing a blueprint to Playground.

My proposal is to write a guide on using Playground to showcase your theme.

We have some working examples in the current Block Theme Examples repo (click the links in the README to see how this works): https://github.com/WordPress/block-theme-examples

@bph
Copy link
Collaborator

bph commented Apr 10, 2024

notes for demo content:

  • 10 posts w. featured images
  • Pages with patterns
    How to handle Challenges:
  • XML has wrong images.
  • where to store images for content and patterns
  • Hotlink to the photo library.
  • Mixed content errors.

@vcanales
Copy link
Member

Hi 👋 I've been working on automatically generating theme previews for PRs in Automattic's free themes repo, in case it helps as an example of how to implement this and the constraints it involves.

Automattic/themes#7719

@bph
Copy link
Collaborator

bph commented May 3, 2024

Theme demo with proper media imports is now possible
Bug Fix: Support wp_crop_image in import wxr

Now this process should work.

  • Create content in WordPress site
  • Export via built in exporter
  • Upload all images to GitHub space
  • Search/replace image references to GitHub location in xml file
  • upload xml file to GitHub as well.

@bph bph self-assigned this May 7, 2024
@bph bph moved this from Needs a writer to In Progress in Developer Blog Content Board May 7, 2024
@bph
Copy link
Collaborator

bph commented May 7, 2024

With the bug fix in, @justintadlock content blueprint for #238 and my work with the Blueprint Gallery, I have enough knowledge and resources to give this topic a go.

@bph bph removed the flow: needs writer the idea/pitch needs a writer label May 7, 2024
@bph
Copy link
Collaborator

bph commented May 27, 2024

Skeleton for a different use case but with all the pieces:

  • Add dashboard widget
  • Import content with images
  • Pretty links
  • Landing on wp-admin without the Welcome screen.

@bph
Copy link
Collaborator

bph commented Sep 17, 2024

Started working on the post on google Docs
It's all still very much WIP and not yet ready for feedback.

And example code on GitHub

@bph
Copy link
Collaborator

bph commented Sep 20, 2024

On content import, the theme demo ran into a bug on Playground, which was reported here:
Intermittent white screen from navigation links

I continued on the writing tasks...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

No branches or pull requests

4 participants
@bph @vcanales @justintadlock and others