Tiny Blocks
WordPress block editor framework
by Tiny Pixel Collective, LLC · github.com/pixelcollective/tiny-blocks · website
★ 32stars
6forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/pixelcollective/tiny-blocks/archive/refs/heads/master.zipDeclares an update source (https://github.com/pixelcollective/tiny-blocks), so updates arrive through the plugin's own updater.
From the readme
tiny-pixel/blocks
Provides a backbone for building modular blocks with Blade templating support.
This framework is under active development.
What this is
- A way to streamline and structure the registration of blocks
- A way to streamline and structure the registration of block assets
- A provider of Blade functionality and templating utilities for server-rendered, dynamic blocks.
What this is not
- A way of writing editor blocks without javascript
Getting started
Use composer to install the package to your project:
Usage
See the demo directory in the repo for an example implementation.
File structure:
Somewhere in your plugin, hook into the tinypixel/blocks/loaded action.
It passes you an instance of the library. Call main to kick everything off.
You must pass the path to your config directory to main.
In config/app.php, you only really need to do two things:
1. Add your blocks to the classes in the blocks key:
2. Change the project.domain key to match the namespace of your blocks. Not the PHP namespace, but the block namespace used in registerblocktype.
You can modify the other settings as you see fit. They are largely self explanatory and control where caches ar
Read the full README on GitHub →
Releases
| Tag | Published |
|---|---|
| v1.0.2 | Sep 22, 2021 |
| 1.0.1 | Sep 22, 2021 |
| v1.0.0 | Sep 20, 2021 |
| v0.9.1 | Dec 19, 2019 |
| v0.9.0 | Dec 19, 2019 |
These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.