WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
40 stars 5 forks source link

Tutorial on using template types in the Patterns API #65

Closed justintadlock closed 1 year ago

justintadlock commented 1 year ago

This would be a new tutorial that covers using the templateTypes option in the Patterns API. It is currently awaiting the UI component: https://github.com/WordPress/gutenberg/issues/42325

Related: locking to template types: https://github.com/WordPress/gutenberg/issues/47208

Discussed in https://github.com/WordPress/developer-blog-content/discussions/58

Originally posted by **annezazu** January 16, 2023 Basically create a how to/application style post around using this new functionality: https://github.com/WordPress/gutenberg/pull/45814
annezazu commented 1 year ago

Noting this PR too to keep an eye out for: https://github.com/WordPress/gutenberg/pull/47322

justintadlock commented 1 year ago

This post might also have some crossover with the multiple homepage options idea. Since I was first assigned this post, I've been trying to think of interesting use cases, and I believe offering multiple patterns that are tied to the "front page" template type is worth exploring. @annezazu's response on that discussion was a bit of a "light bulb" moment for me, so I'm mostly just noting this so I don't forget.

justintadlock commented 1 year ago

It looks like this landed in Gutenberg 15.5 RC1 (https://github.com/WordPress/gutenberg/pull/47322), so I'll begin work on this in the next week or so. That way, we'll have the content ready soon after the release.

justintadlock commented 1 year ago

I have started working on this in a Google Doc: https://docs.google.com/document/d/1NCT7Cb_0UJnuinQsocNWFc8Ua7j91v_FJ88IPurhDUs/edit?usp=sharing

annezazu commented 1 year ago

This is already looking great, Justin :)

justintadlock commented 1 year ago

This first draft doc is now ready for review.

marybaum commented 1 year ago

I’ll do a drive-by in the morning before 🎾

marybaum commented 1 year ago

Done! Now off to 🎾

annezazu commented 1 year ago

Looks good! Had one minor comment.

justintadlock commented 1 year ago

Thanks, @marybaum and @annezazu!

justintadlock commented 1 year ago

Published here: https://developer.wordpress.org/news/2023/04/using-template-patterns-to-build-multiple-homepage-designs/