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 the block.json schema to each block.json file #167

Merged
merged 2 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions 01-basic-esnext/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-01-basic-esnext",
"title": "Example: Basic (ESNext)",
Expand Down
3 changes: 2 additions & 1 deletion 01-basic/block.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{
"$schema": "https://json.schemastore.org/block.json",
"title": "Example: Basic",
"name": "gutenberg-examples/example-01-basic",
"category": "layout",
"icon": "universal-access-alt",
"textDomain": "gutenberg-examples",
"textdomain": "gutenberg-examples",
"example": {},
"editorScript": "file:./block.js"
}
1 change: 1 addition & 0 deletions 02-stylesheets/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-02-stylesheets",
"title": "Example: Stylesheets",
Expand Down
5 changes: 3 additions & 2 deletions 03-editable-esnext/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-03-editable-esnext",
"title": "Example: Editable (ESNext)",
Expand All @@ -7,8 +8,8 @@
"category": "layout",
"attributes": {
"content": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "p"
}
},
Expand Down
5 changes: 3 additions & 2 deletions 03-editable/block.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-03-editable",
"title": "Example: Editable",
"icon": "universal-access-alt",
"category": "layout",
"attributes": {
"content": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "p"
}
},
Expand Down
5 changes: 3 additions & 2 deletions 04-controls-esnext/block.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-04-controls-esnext",
"title": "Example: Controls (ESNext)",
Expand All @@ -7,8 +8,8 @@
"category": "layout",
"attributes": {
"content": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "p"
},
"alignment": {
Expand Down
5 changes: 3 additions & 2 deletions 04-controls/block.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-04-controls",
"title": "Example: Controls",
"icon": "universal-access-alt",
"category": "layout",
"attributes": {
"content": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "p"
},
"alignment": {
Expand Down
23 changes: 12 additions & 11 deletions 05-recipe-card-esnext/block.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-05-recipe-card-esnext",
"title": "Example: Recipe Card (ESNext)",
"icon": "index-card",
"category": "layout",
"attributes": {
"title": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "h2"
},
"mediaID": {
Expand All @@ -20,13 +21,13 @@
"attribute": "src"
},
"ingredients": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": ".ingredients"
},
"instructions": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": ".steps"
}
},
Expand All @@ -36,15 +37,15 @@
"mediaID": 1,
"mediaURL": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/2ChocolateChipCookies.jpg/320px-2ChocolateChipCookies.jpg",
"ingredients": [
{ "type": "li", "props": { "children": [ "flour" ] } },
{ "type": "li", "props": { "children": [ "sugar" ] } },
{ "type": "li", "props": { "children": [ "chocolate" ] } },
{ "type": "li", "props": { "children": [ "💖" ] } }
{ "type": "li", "props": { "children": ["flour"] } },
{ "type": "li", "props": { "children": ["sugar"] } },
{ "type": "li", "props": { "children": ["chocolate"] } },
{ "type": "li", "props": { "children": ["💖"] } }
],
"instructions": [
{
"type": "p",
"props": { "children": [ "Mix, Bake, Enjoy!" ] }
"props": { "children": ["Mix, Bake, Enjoy!"] }
}
]
}
Expand Down
17 changes: 9 additions & 8 deletions 05-recipe-card/block.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-05-recipe-card",
"title": "Example: Recipe Card",
"icon": "index-card",
"category": "layout",
"attributes": {
"title": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": "h2"
},
"mediaID": {
Expand All @@ -20,22 +21,22 @@
"attribute": "src"
},
"ingredients": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": ".ingredients"
},
"instructions": {
"type": "array",
"source": "children",
"type": "string",
"source": "html",
"selector": ".steps"
}
},
"example": {
"attributes": {
"title": "Chocolate Chip Cookies",
"mediaURL": "https://upload.wikimedia.org/wikipedia/commons/thumb/f/f1/2ChocolateChipCookies.jpg/320px-2ChocolateChipCookies.jpg",
"ingredients": [ "flour", "sugar", "chocolate", "💖" ],
"instructions": [ "Mix", "Bake", "Enjoy" ]
"ingredients": ["flour", "sugar", "chocolate", "💖"],
"instructions": ["Mix", "Bake", "Enjoy"]
}
},
"editorScript": "file:./block.js",
Expand Down
3 changes: 2 additions & 1 deletion 06-inner-blocks-esnext/block.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-06-esnext",
"title": "Example: Inner Blocks (ESNext)",
"category": "layout",
"icon": "universal-access-alt",
"textDomain": "gutenberg-examples",
"textdomain": "gutenberg-examples",
"example": {},
"editorScript": "file:./build/index.js"
}
3 changes: 2 additions & 1 deletion 06-inner-blocks/block.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"$schema": "https://json.schemastore.org/block.json",
"apiVersion": 2,
"name": "gutenberg-examples/example-06",
"title": "Example: Inner Blocks",
"category": "layout",
"icon": "universal-access-alt",
"textDomain": "gutenberg-examples",
"textdomain": "gutenberg-examples",
"example": {},
"editorScript": "file:./block.js"
}