1

I'm creating custom pages using Pages + Layout Builder. These layouts need to be stored in GIT as config files (drush cex). Currently, the layouts themselves are stored fine.

The main problem is that custom block contents are stored in the database and if someone clones the repository and applies changes using drush cim, they are missing the block contents.

6

Then don't use custom block types because they are stored in content entities.

Use blocks storing only configuration. You can build a custom block plugin, even with a body field. See Custom block build function to display wysiwyg body text

There are also some contrib options like Simple Block which is implementing a config entity for blocks.

1
  • Thank you! I've opted to use the Simple Block module. The only downside seems to be, that there is no way of creating Simple Blocks directly in Layout Builder (like custom blocks). Will go ahead and create an issue for that. – Elaman Dec 3 '20 at 1:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.