A powerful tool for WordPress developers that enhances the Gutenberg editor by enabling the efficient creation and management of custom blocks and patterns.
The Block Library plugin is designed to consolidate all your custom blocks and patterns into one single plugin, making it easier to create complex and unique page layouts.
Key features include:
- A library of custom blocks addressing a variety of design and functionality needs.
- A custom block category, 'Block Library', to organize custom blocks within the Gutenberg editor.
- A bash script for automating the creation of new custom blocks.
- A bash script for automating the removal of custom blocks.
- A bash script for automating the creation of new custom patterns.
- A bash script for automating the removal of custom patterns.
- Ensure you have Node.js and npm installed on your machine.
- Run
npm install
in the root directory of the plugin to install all project dependencies. - Make the block creation script executable by running
chmod +x create-block.sh
in the root directory of the plugin. - Make the block removal script executable by running
chmod +x remove-block.sh
in the root directory of the plugin. - Make the pattern creation script executable by running
chmod +x create-pattern.sh
in the root directory of the plugin. - Make the pattern removal script executable by running
chmod +x remove-pattern.sh
in the root directory of the plugin.
The npm run build
command can be used to perform a global build of the blocks, or the npm run build:<block-name>
command can be used to perform a build for a single block.
To create a new block, run ./create-block.sh "<block-name>"
replacing <block-name>
with the name of the new block you want to create.
To remove a block, run ./remove-block.sh "<block-name>"
replacing <block-name>
with the name of the block you want to remove.
To create a new pattern, run ./create-pattern.sh "<pattern-name>"
replacing <pattern-name>
with the name of the new pattern you want to create.
To remove a pattern, run ./remove-pattern.sh "<pattern-name>"
replacing <pattern-name>
with the name of the pattern you want to remove.
- Initial release.