Blockify everything, prefering HTML+blocks rather than patterns. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR'ing this against my own repo intentionally for a self-reminder. This is probably going to go stale very quickly, but that's OK.
This was a trial-run at removing some of the template-parts and using block templates instead instead of pattern hacking.
Things I ran into:
wp:queryworks, but I ran into shortcomings around the blocks available via it.wp:post-templateyou can set the className on the<ul>but you can't set the class on the<li>(which is what thepost_classis). This lead to a str_replace on the block render HTML to addplugin-cardto the plugin-cards, later fixed by using a different CSS selector instead.. Unable to add a class to query block list item WordPress/gutenberg#41441wp:post-templateyou can't define a "top level" block, so the "plugin-card" block is actually only the contents of the node that it would be rendered as, ie. it's all of the contents inside the<li>....</li>not including thelitags.<ul>to something like<div>. Usecore/post-templateto have each post render within<article>tags WordPress/gutenberg#37659wporg/missing-template-tageval block for this, and I quite like it as a hacky fixer.<!-- wp:wporg/missing-template-tag {"function":"the_archive_description","args":["<div class='taxonomy-description'>", "</div>"]} /--><!-- wp:wporg/missing-template-tag {"function":"the_posts_pagination"} /-->wp_headfires, so there's some customization on archive titles that doesn't apply to the block rendered header.query-titleblock which was laughable. See 9260f8f