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