Once you've classified the patterns into blocks, you're ready to start building.
All theme developers almost certainly came across Advanced Custom Fields (ACF) at some point. You can create different field types through the intuitive interface. Everything from basic text fields and content editors to date pickers, map embeds, and gallery fields. These can be easily assigned to different areas of your site, such as post types, page templates, categories, and user pages.
The latest version of ACF, the ACF block, extends all this familiar functionality to Gutenberg. Groups of fields can be created in exactly the same way as any other Cork Bicycle Rent zone area of the site and assigned to various ACF-based blocks.With just a few lines of code needed to create a block and output fields, you can create a basic custom block within minutes. This approach made it easy to create blocks, allowing us to focus on building, outputting, and styling the blocks.You have now created a suite of custom blocks that are constrained to the design of the theme that helps with a consistent layout while providing all the flexibility of Gutenberg.
Custom introductory repeater block
Custom introductory repeater block with preview on the left and ACF field on the right
Pattern library plugin
After creating some sample blocks, I decided to package the blocks inside a custom plugin with the help of the engineering team.
This block-based plugin allows you to quickly deploy custom patterns for new website builds. These are further customized at the theme level.
The pattern library plugin contains some useful features.
A basic block template file that allows you to quickly add new blocks.
Ability to initialize core and custom blocks and allow them to be included in custom categories.
Administrator settings screen that allows you to enable or disable each block.
Ability to override the layout and structure of blocks in a theme.
Ability to overwrite block styles at the theme level.