{"id":96199,"date":"2022-05-05T09:50:32","date_gmt":"2022-05-05T09:50:32","guid":{"rendered":"https:\/\/make.wordpress.org\/core\/?p=96199"},"modified":"2022-05-05T10:10:48","modified_gmt":"2022-05-05T10:10:48","slug":"updates-to-the-wordpress-create-block-templating-system","status":"publish","type":"post","link":"https:\/\/make.wordpress.org\/core\/2022\/05\/05\/updates-to-the-wordpress-create-block-templating-system\/","title":{"rendered":"Updates to the @wordpress\/create-block templating system"},"content":{"rendered":"<p class=\"wp-block-paragraph\">A powerful feature of the <code>@wordpress\/create-block<\/code> package is the ability to create templates to allow customization of how a <span tabindex='0' class='glossary-item-container'>block<span class='glossary-item-hidden-content'><span class='glossary-item-header'>Block<\/span> <span class='glossary-item-description'>Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience.<\/span><\/span><\/span> is structured.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">WordPress 6.0 introduces some new template variables to allow even more customization. Templates can now use the\u00a0<code>customScripts<\/code>\u00a0variable to create new entries in the\u00a0<code>scripts<\/code>\u00a0property of the <code>package.json<\/code> file and while it was already possible to define dependencies, it is now also possible to defined a list of development dependencies using the\u00a0<code>npmDevDependencies<\/code>\u00a0variable. In addition to these new template variables, the\u00a0<code>@wordpres\/env<\/code>\u00a0package will automatically be added to the list of devDependences when the template uses the\u00a0<code>wpEnv<\/code>\u00a0template variable or if the\u00a0<code>\u2014wp-env<\/code>\u00a0flag is passed as a command line argument.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For more info see <a href=\"https:\/\/github.com\/WordPress\/gutenberg\/pull\/38535\">#38535<\/a>,\u00a0<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/pull\/39723\">#39723<\/a>, and\u00a0<a href=\"https:\/\/github.com\/WordPress\/gutenberg\/pull\/38530\">#38530<\/a>.<\/p>\n<p class=\"o2-appended-tags\"><a href=\"https:\/\/make.wordpress.org\/core\/tag\/6-0\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>6-0<\/a>, <a href=\"https:\/\/make.wordpress.org\/core\/tag\/dev-notes\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>dev-notes<\/a>, <a href=\"https:\/\/make.wordpress.org\/core\/tag\/dev-notes-6-0\/\" class=\"tag\"><span class=\"tag-prefix\">#<\/span>dev-notes-6-0<\/a><\/p><nav class='o2-post-footer-actions'><ul class='o2-post-footer-action-row'><\/ul><div class='o2-post-footer-action-likes'><\/div><ul class='o2-post-footer-action-row'><\/ul><\/nav>","protected":false},"excerpt":{"rendered":"<p>A powerful feature of the @wordpress\/create-block package is the ability to create templates to allow customization of how a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past [&hellip;]<\/p>\n","protected":false},"author":7543064,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","advanced_seo_description":"","jetpack_seo_html_title":"","jetpack_seo_noindex":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1175],"tags":[4132,1443,4331],"class_list":["post-96199","post","type-post","status-publish","format-standard","hentry","category-general","tag-6-0","tag-dev-notes","tag-dev-notes-6-0","author-welcher"],"revision_note":"","jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2AvED-p1B","_links":{"self":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/96199","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/users\/7543064"}],"replies":[{"embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/comments?post=96199"}],"version-history":[{"count":4,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/96199\/revisions"}],"predecessor-version":[{"id":96207,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/posts\/96199\/revisions\/96207"}],"wp:attachment":[{"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/media?parent=96199"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/categories?post=96199"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/make.wordpress.org\/core\/wp-json\/wp\/v2\/tags?post=96199"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}