From a7457fc58392c343c28b43ee68f24700093bee6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Thu, 18 Mar 2021 13:16:39 +0100 Subject: [PATCH 1/2] TT1 Blocks: Update custom templates and template parts in the config Related to changes proposed in Gutenberg in https://github.com/WordPress/gutenberg/pull/29828. There is going to be a bit different format for `customTemplates` and `templateParts`. The rationale behind it is that we want to align with other lists like font sizes, color palettes, or gradients. It should make it easier to write those configurations but it also will simplify the logic that handles translations. --- tt1-blocks/experimental-theme.json | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/tt1-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json index e0c7190a..ef099af5 100644 --- a/tt1-blocks/experimental-theme.json +++ b/tt1-blocks/experimental-theme.json @@ -1,9 +1,11 @@ { - "templateParts": { - "header": { + "templateParts": [ + { + "name": "header", "area": "header" }, - "footer": { + { + "name": "footer", "area": "footer" } }, @@ -280,9 +282,10 @@ } } }, - "customTemplates": { - "page-home": { + "customTemplates": [ + { + "name": "page-home", "title": "Page without title" } - } + ] } From 93f7b44a23cde2fd3fee3765d10db6b989d61436 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Greg=20Zi=C3=B3=C5=82kowski?= Date: Thu, 18 Mar 2021 13:17:53 +0100 Subject: [PATCH 2/2] Fix the missed closing bracket --- tt1-blocks/experimental-theme.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tt1-blocks/experimental-theme.json b/tt1-blocks/experimental-theme.json index ef099af5..8414a194 100644 --- a/tt1-blocks/experimental-theme.json +++ b/tt1-blocks/experimental-theme.json @@ -8,7 +8,7 @@ "name": "footer", "area": "footer" } - }, + ], "settings": { "defaults": { "color": {