Skip to content
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

Add proper templates to Assembler (WIP) #7532

Closed
wants to merge 11 commits into from
Closed

Conversation

richtabor
Copy link
Contributor

@richtabor richtabor commented Dec 6, 2023

Updates the templates for Assembler, as a follow-up for #7528.

An exploration into simpler templates v. page content

This PR reduces the template load to index, archive, and single, as follows:

Index

  • Template file consists of header part, main element with post content, and footer part.
  • Loads the page set as homepage in the reading settings.
  • All pages resemble this template; it's the source.

Archive

  • Template file contains a generic blog layout for archive views.
  • We can provide alternate archive templates to replace with (like TT4 does).

Archive

  • Template file contains a generic single post layout.
  • We can provide alternate single post templates to replace with (like TT4 does).

Caveats

In the Assembler flow on WordPress.com, we would need to create a "Home" page and assign it to the homepage via the reading settings option—instead of creating/augmenting a home.html template.

  • The reading settings must be set to a static page.
  • A homepage must be set for the static page.

Props @SaxonF.

@richtabor richtabor marked this pull request as ready for review December 6, 2023 21:04
@richtabor richtabor changed the title Add proper templates to Assembler Add proper templates to Assembler (WIP) Dec 6, 2023
@fushar
Copy link
Contributor

fushar commented Dec 6, 2023

@richtabor Sorry could you rebase; there's conflict after I merged #7529 😄

@richtabor richtabor force-pushed the assembler/templates branch from 5f133df to 1650c4e Compare December 6, 2023 22:42
@richtabor richtabor self-assigned this Dec 6, 2023
@autumnfjeld
Copy link
Contributor

@ianstewart

@SaxonF
Copy link

SaxonF commented Dec 7, 2023

The template hierarchy can be a confusing concept to grasp even for experienced developers. I would advocate for moving in the direction of treating templates more like simple wrappers leaving pages to contain your sites content. This is something core needs to address but the approach here at least begins to move in that direction.

It also plays nicely into the idea that the showcase can become a much more composable / mix and match type experience that leads into the assembler. If most themes are driven by the same pattern library, then applying a homepage from the showcase is as simple as copying the pattern or page.

All that to say, given the confusion on Dotcom surrounding templates, I think this approach would be a worthwhile experiment.

@scruffian
Copy link
Member

This makes me think of an idea connected to something @SaxonF shared earlier. It seems like we could never use home.html and front-page.html, and instead rely on reading settings to control the contents of the home page. This would make it more important to have reading settings in the Site Editor.

@richtabor
Copy link
Contributor Author

I made an alternate PR to get Assembler templates in a decent place; we can discuss/explore this method in the meantime.

@richtabor
Copy link
Contributor Author

Closing for now, as the alternate was merged. #7538

@richtabor richtabor closed this Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants