-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create the TwentyTwenty Demo Site using Block Templates #5
Conversation
Add support for block style variations to support header and footer
Added block style variations cover block
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add block style variations for about page and header Add about page and blog page templates to starter content
Add template parts for primary page content Namespace to twentytwenty-blocks
The stylesheet registration here throws errors if it's tied to the after_setup_theme hook. This commit moves it to init instead.
@kjellr I made two commits that attempt to simplify the example by moving the blocks that were previously in block templates, directly into the starter content. This has caused some unexpected issues that I could use a second pair of eyes on to debug, namely:
I've tested this locally and on jurassic ninja. |
Add editor styles, remove some stylesheets to keep the demo simple.
@jffng: I pushed a bunch of updates this morning. These sort of sidestep the issues you'd been having around the starter content by (mostly) falling back on the starter content that's baked into the theme by default, rather than the more complicated starter content in the theme demo site. This is a little bit of a shift from the initial attempt that this PR made, but I think it is a decent start for the demo, as it simplifies things greatly. I also updated the Here are a few screenshots of a fresh install, with the starter content active: Anyway, let me know what you think. If this is generally working, I think we can probably merge this in and iterate so other folks can get testing more easily. |
'thumbnail' => '{{image-opening}}', | ||
'post_content' => join( | ||
'', | ||
array( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm a little torn about how to handle this starter content still:
For our purposes now, I do think it would help code readability to move this into template part, but I'm not sure it actually makes sense to at this point — since this is just standard page content, users will want to edit this inside the standard page editor, not in the block templates area of the editor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what we're really looking to use is "Page Templates", as per WordPress/gutenberg#18055. That functionality doesn't appear to be ready for themes too hook into yet, so sticking with the starter content is probably the best option we have at the moment. I've left some feedback in that ticket here: WordPress/gutenberg#18055 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While it does improve readability at this moment, I agree that putting starter content in a block template is not the right approach.
It works like a charm. Much simpler and easier to understand the concept of a block based theme this way, instead of trying to recreate the demo site entirely, thank you! 🎉 Going to merge, and we can revisit this if and when it becomes clearer how to handle starter content. |
Description
[WIP] This PR is an attempt to create https://2020.wordpress.net/ using block templates. The purpose is to demonstrate how block templates work and identify any hiccups encountered developing a theme + site this way.
How To Test
Known Issues
Screenshots
Home page
Exhibitions page
Footer