-
Notifications
You must be signed in to change notification settings - Fork 1
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
Gutenberg-related commands #119
Comments
There's very little server side interface to Gutenberg, so we're quite limited in what can be done on the CLI. WordPress/gutenberg#4116 Here's some requests I've seen mentioned at HM and elsewhere:
|
This reminds of the
This is probably not gonna be possible as all the block transforms are written in JavaScript.
👍 + including reusable blocks. |
Easy... => |
Something else that might be worth considering here is updating non-dynamic blocks when the block definition is modified. Right now, it seems like the only way to do that is to manually open every post where the block is used and resave it. I've been following the discussion here about this for a little while and WP-CLI was mentioned as a possible solution. Of course, in that comment, he's talking about doing a DB find and replace which is already supported, but that would probably be a bit messy and error prone. If WP-CLI had first class support for this type of operation that might go along way to solving the problem. |
As soon as that information is available in PHP, sure. The problem here - as with block transforms available in PHP - is that this will be something all developers have to opt in first. Which means it can take a while until this will be truly helpful. |
Some updates regarding server-side awareness of blocks: |
There's more and more work being done on improving the server-side awareness of blocks, so I'm approving the general idea of adding a |
I would like to be able to create a page and add a block during the create script for wp-env. I.e. declaratively set up the pages which will be used by my E2E tests. Currently I have a WooCommerce Blocks-Checkout post_content saved in a txt file which I then import. The single Checkout block comprises of ~22 blocks. (looks like that's how WooCommerce also do it) Saving the existing one isn't too difficult:
And I insert it with:
But it would be neater to do something like:
|
Reusable blocks ( Nowadays widgets can also be blocks. I don't know how well that works with https://github.com/wp-cli/widget-command... Probably not at all? So there might be some room for improvement there as well. Related to that, just sharing https://github.com/spacedmonkey/wp-rest-blocks here as it might be useful. Also, what about the site editor, At the very least, if things like that can be used already with existing commands, we should provide some good examples in the documentation. Oh, and |
I just stumbled upon https://twitter.com/johnbillion/status/1071563623280070656 again and was wondering what kind of WP-CLI commands we should add to make interaction with block-based blogs easier.
For example:
The text was updated successfully, but these errors were encountered: