WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
36 stars 2 forks source link

Creating a low-code block theme development workflow with WordPress Playground and the Create Block Theme plugin #272

Open bph opened 3 weeks ago

bph commented 3 weeks ago

Discussed in https://github.com/WordPress/developer-blog-content/discussions/266

Originally posted by **ndiego** May 31, 2024 This article will detail how you can set up a low-code (or virtually no-low) development workflow for block themes using [WordPress Playground](https://wordpress.github.io/wordpress-playground/) and the [Create Block Theme](https://wordpress.org/plugins/create-block-theme/) plugin. So long as the theme has a repository on GitHub, you can let contributors submit PRs to modify the theme without touching a line of code. Here’s how it works:
 - The contributor clicks on a link, presumably in the readme of the repo - A Playground instance is opened up containing the main branch of the theme - The contributor can then make changes to the theme in the Site Editor - Once changes are complete, they write those changes to the theme using the Create Block Theme plugin - Then, using a preset configuration set by the Playground blueprint and the [Query API](https://wordpress.github.io/wordpress-playground/query-api), the contributor can create a PR from within Playground for their changes - Then the PR is open in the GitHub repo where they can make any additional changes (modify the title, add labels, etc.) The goal of this article is to show what is currently possible with Playground and inspire readers to both use Playground and explore how it can be used in novel workflows. This article's publication will need to wait for the [GitHub proxy](https://github-proxy.com/) to be moved to an official location, which is in the works. cc @adamziel
adamziel commented 3 weeks ago

@ndiego @bph Figuring out GitHub proxy may take some time. However, there's also a GitHub import feature that could be a good alternative for now:

CleanShot 2024-06-10 at 20 50 43@2x

There are two downsides to it:

  1. It can't yet be pre-populated with values like the GitHub export form – we could add a few query parameters to enable that.
  2. You have to go through a GitHub connection flow upfront.

Would that unblock the work here @ndiego @bph?

abhansnuk commented 2 weeks ago

Linking to request for links and added info on GitHub, as well as to relevant places on LearnWP for playground in the final piece. Thanks https://github.com/WordPress/developer-blog-content/discussions/266#discussioncomment-9633054