-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Labels
[Priority] Medium[Type] EnhancementEnhancement done or needs to be done for an existing featureEnhancement done or needs to be done for an existing feature
Description
Summary
At present the theme does not have any example of how to add block in the theme itself.
This issue explores the necessary configuration and structural changes for building blocks in the theme.
Expected workflow for creating a new block in the theme:
- Running
npm run create:block
creates necessary scaffolding for the block using@wordpress/create-block
package. - On build, all necessary block files could be moved to
assets/build/blocks
along with built scripts and styles. - Add support for creating block manifest, ref. https://www.npmjs.com/package/@wordpress/scripts#build-blocks-manifest.
- Register blocks with manifest if available.
Acceptance Criteria
- New block can be added with a npm script.
- New blocks are registered automatically.
- Should be able to exclude any block from build or registration.
- Appropriate documentation has been added to
/docs
Metadata
Metadata
Assignees
Labels
[Priority] Medium[Type] EnhancementEnhancement done or needs to be done for an existing featureEnhancement done or needs to be done for an existing feature