From 70063942bbe918d0a1528fb68c23a80b4b206314 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 8 Apr 2021 09:13:30 +0100 Subject: [PATCH] Add some site blocks to the default template --- .../post-editor-template-mode.test.js.snap | 10 +++++++++- .../src/components/sidebar/post-template/index.js | 3 +++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/e2e-tests/specs/experiments/__snapshots__/post-editor-template-mode.test.js.snap b/packages/e2e-tests/specs/experiments/__snapshots__/post-editor-template-mode.test.js.snap index 58280bb08917b..641ad5cc97921 100644 --- a/packages/e2e-tests/specs/experiments/__snapshots__/post-editor-template-mode.test.js.snap +++ b/packages/e2e-tests/specs/experiments/__snapshots__/post-editor-template-mode.test.js.snap @@ -1,7 +1,15 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`Post Editor Template mode Allow creating custom block templates in classic themes 1`] = ` -"

Another FSE Post

+"

gutenberg

+ +

Just another WordPress site

+ + +
+ + +

Another FSE Post

Hello World

diff --git a/packages/edit-post/src/components/sidebar/post-template/index.js b/packages/edit-post/src/components/sidebar/post-template/index.js index 5791b984fc969..05eef4febd9b8 100644 --- a/packages/edit-post/src/components/sidebar/post-template/index.js +++ b/packages/edit-post/src/components/sidebar/post-template/index.js @@ -108,6 +108,9 @@ function PostTemplate() { event.preventDefault(); const defaultTitle = __( 'Custom Template' ); const templateContent = [ + createBlock( 'core/site-title' ), + createBlock( 'core/site-tagline' ), + createBlock( 'core/separator' ), createBlock( 'core/post-title' ), createBlock( 'core/post-content' ), ];