Site logo

Archived topic

GenerateBlocks + Import/Export approach.... is this ok?

7 replies · Started by Henry on July 7, 2020

Viewing posts 1–8 of 8

I really like the GenerateBlocks plugin and direction, it's a really excellent idea.

Here's my question...

I am using GeneratePress Pro. If I create a local installation of GP Pro with a starter theme, can I save some of the blocks that I like for design and then import those into my main site?

In other words, I am asking if it is possible to cherry-pick certain blocks that I think would work in my design.

I have a feeling that this might not be possible b/c the CSS of the starter theme is inherent right?

I guess I could reverse engineer the blocks but that sounds like a ton of work...

Thanks!

Hi there,

for the time being you can copy blocks ( Select Block > CTRL C ) from one site and Paste ( CTRL -V ) to another.

The other method is to Convert the Block to a Re-useable block. Which can be export / imported to other sites where you can convert them back to a Regular block.

In the future Pro version of GenerateBlocks we will be looking at template libraries to make this sort of thing easier.

Thanks David - so, would I export a JSON file from site A and import the JSON (JavaScript GenerateBlock) block?

Just want to be 100% clear, thanks

The Gutenberg editor allows you export Re-usable Blocks as a JSON file.
Unless you're using a plugin there is no JSON export for content from with the editor.
If you view the editor in Code View you can copy and paste the JSON/HTML it displays.

Thanks - and great to hear.

Out of interest, does the JSON contain the CSS styling?

The JSON contains the Block settings, which in turn the plugin generates the CSS for.

Thanks, David, as ever 10/10 support!

Happy to hear that

This archived topic is closed to new replies.