Skip to content

rmorse/multiple-blocks-plugin

Repository files navigation

Multiple blocks plugin

This is an implementation of the fantastic @wordpress/create-block package, with some restructuring to support multiple blocks in a single WordPress plugin.

I strongly recommend to read the official guide, the docs, and check out the article from it's creator Greg Ziółkowski.

Follow the tutorial

This project was built to support the tutorial found here - which uses the WordPress recommended way of creating a block plugin and teaches you how to add additional blocks should you need them.

If you prefer not to follow along, you can continue with the standard setup:

Installation

  1. Clone the project to your desired location

  2. Open the command line in the project folder and install the packages:

    npm install
  3. Grab a coffee

Usage

Run the scripts for the included buy-button block

npm run start:buy-button
npm run build:buy-button

Run the scripts for the included hero block

npm run start:hero
npm run build:hero

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

Everyone is permitted to copy and distribute verbatim or modified copies of this license software, and changing it is allowed - for any purpose. No credit is needed whatsoever.

Your WordPress plugin should have a GPL2 or Later license, though.