Open TeBenachi opened 2 years ago
In addition to the above, we need to include information about block markup and how to use it.
Please consider the following updates to be a starting point. Feel free to edit/remove/add content, including moving it to different documents
There is a scheduled update for the entry page for block themes that is ready to be reviewed. I listed the theme basics chapter as a prerequisite so that we do not need to bring up details about functions.php, style.css, etc a second time. https://developer.wordpress.org/wp-admin/post.php?post=138837&action=edit
I created a new one-page draft that so far includes:
I left the "creating templates in the template editor section" as a link to the existing support article. This is not intended to be published as-is, but to be moved to new pages if we decided it needs to be separate pages and not just sections. https://developer.wordpress.org/wp-admin/post.php?post=138840&action=edit
Theme.json can be used by both classic themes and block themes. The existing page is in the advanced section, and has a scheduled update that is ready for review: https://developer.wordpress.org/wp-admin/post.php?post=138713&action=edit
Thank you for the write-up! Thank you.
One thing I thought we could add is about the reference under Exporting.
When an exported file includes the reference number (e.g. “ref:123”), it causes an error when using the file on another site. It took me a while to figure this out. It might help others to clarify.
Something like….
If an exported file includes a reference number to a specific block such as navigation, the reference number should be removed.
<!-- wp:navigation {"ref”:123} /—>
Should be
<!-- wp:navigation /-->
I also thought about the prefix (different from classic themes) and translation, but the “Converting classic theme to block theme” section might be appropriate.
Added a section about enqueueing block styles, but it is very long. Eventually, this may be replaced by a proper developer reference page for the new wp_enqueue_block_style().
Added a theme.json setting and add_theme_support comparison table.
Theme authors are asking how to correctly load JavaScript in the different editors. I think we need to include that, but I don't actually have the answer. (My personal preference is don't do that, and rely on blocks instead)
Thank you so much for updating. Looks really great. Amazing! https://developer.wordpress.org/wp-admin/post.php?post=138840&action=edit
I realized I forgot to include the How to create a child theme section in the above list. Is it Ok if I add #105, perhaps after the exporting?
For Javascript, can we refer authors to Loading JavaScript page?
Yes, we can refer to the Loading JavaScript page in the block editor handbook. I was hesitant to recommend enqueue_block_editor_assets because it used to trigger a warning. The warning has now been removed.
The original page I started writing in is now called "Block theme setup" This page has been published. Please feel free to continue editing.
I moved the template/parts and block markup content to a new page called "Templates and template parts" This page has been published
Heads up @kafleg @carolinan @TeBenachi - the "themes" label was applied to this issue.
Most of these pages have already been added; the ones I am unsure of is:
I am not sure what 1 refers to. I think 2 might be the comparison table? https://developer.wordpress.org/themes/block-themes/#differences-and-similarities-between-classic-themes-and-block-themes
As we are moving forward with merging with the Theme handbook, here is a list of suggested new pages related to the block theme. The new pages will go under the Block theme section.
==
Introduction and overview Difference between block theme and classic theme
How to create a block theme
Global Styles and Theme.json Theme Support
Converting classic theme to block theme (#106)
What is patterns? How to make patterns? What are the patterns category?