Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for building blocks in theme #510

Open
8 tasks
divyarajmasani opened this issue Jan 17, 2025 · 0 comments · May be fixed by #512
Open
8 tasks

Add support for building blocks in theme #510

divyarajmasani opened this issue Jan 17, 2025 · 0 comments · May be fixed by #512
Assignees
Labels
[Priority] Medium [Type] Enhancement Enhancement done or needs to be done for an existing feature

Comments

@divyarajmasani
Copy link
Contributor

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
@divyarajmasani divyarajmasani added [Priority] Medium [Type] Enhancement Enhancement done or needs to be done for an existing feature labels Jan 17, 2025
@nani-samireddy nani-samireddy linked a pull request Jan 20, 2025 that will close this issue
4 tasks
@nani-samireddy nani-samireddy linked a pull request Jan 20, 2025 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Priority] Medium [Type] Enhancement Enhancement done or needs to be done for an existing feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants