README.md
| 1 | # Jetpack Block Editor Extensions |
| 2 | |
| 3 | This directory lists extensions for the Block Editor, also known as Gutenberg, [](https://wordpress.org/news/2018/12/bebo/that was introduced in WordPress 5.0](https://wordpress.org/news/2018/12/bebo/](https://wordpress.org/news/2018/12/bebo/). |
| 4 | |
| 5 | ## Extension Type |
| 6 | |
| 7 | We define different types of block editor extensions: |
| 8 | |
| 9 | - Blocks are available in the editor itself, and live in the `blocks` directory. |
| 10 | - Plugins are available in the Jetpack sidebar that appears on the right side of the block editor. Those live in the `plugins` directory. |
| 11 | |
| 12 | When adding a new extension, add a new directory for your extension the matching directory. |
| 13 | |
| 14 | ## Extension Structure |
| 15 | |
| 16 | Your extension should follow this structure: |
| 17 | |
| 18 | ``` |
| 19 | . |
| 20 | └── blockname/ |
| 21 | └── blockname.php ← PHP file where the block and its assets are registered. |
| 22 | ``` |
| 23 | |
| 24 | If your block depends on another block, place them all in extensions folder: |
| 25 | |
| 26 | ``` |
| 27 | . |
| 28 | ├── blockname/ |
| 29 | └── sub-blockname/ |
| 30 | ``` |
| 31 | |
| 32 | **Note that this directory is still being populated. For now, you can find the blocks [](https://github.com/Automattic/wp-calypso/tree/master/client/gutenberg/extensionshere](https://github.com/Automattic/wp-calypso/tree/master/client/gutenberg/extensions](https://github.com/Automattic/wp-calypso/tree/master/client/gutenberg/extensions). |
| 33 | |
| 34 | ## Develop new blocks |
| 35 | |
| 36 | You can follow [](../docs/guides/gutenberg-blocks.mdthe instructions here](../docs/guides/gutenberg-blocks.md](../docs/guides/gutenberg-blocks.md) to add your own block to Jetpack. |
| 37 | |
| 38 | ## Block naming conventions |
| 39 | |
| 40 | Blocks should use the `jetpack/` prefix, e.g. `jetpack/markdown`. |
| 41 |