This adds a block template that displays in the block editor of WordPress so a user can add information in a preset way to a template. With the Template Editor, by default it adds under "Post Content." However, this file cannot be overwritten when a user is using a wp_template custom post type - so might be a little awkward to use now. It also has no impact on the front end rendering.
It's also not a great idea to use it for things like post-title as it will render post title twice in the editor, which is potentially confusing.
function register_block_template() {
$page_type_object = get_post_type_object( 'post' );
$page_type_object->template = array(
array( 'core/group', array( 'layout' => array( 'inherit' => 'true' ) ),
array(
array( 'core/post-terms', array( 'term' => 'category' ) ),
array( 'core/post-date', array( 'textAlign' => 'center' ) ),
array( 'core/post-featured-image', array( 'align' => 'wide' ) ),
)
),
);
}
add_action( 'init', 'register_block_template' );