onedesign / generator-one-base

A foundation for One Design Company projects on the web.
Other
1 stars 1 forks source link

Remove head partial #102

Open MikeMcChillin opened 6 years ago

MikeMcChillin commented 6 years ago

https://github.com/onedesign/generator-one-base/blob/master/generators/craft/templates/craft/templates/_layout.html#L22

I like the idea of creating a sample partial, but I also feel strongly that we should only create partials that are reused throughout the codebase. Partials should not be used to simply shrink the length of a single file. In this case, _partials/head.html would only ever be used in one place, and therefore shouldn't be a partial. I vote we just include these 2 lines directly in _layout.html.

cmalven commented 6 years ago

This is definitely an ideological debate the team should have. I'm on the other side of the debate. I think there's tremendous value in making files significantly more scannable by moving large chunks of related code into a separate partial, and often this head partial (for instance) becomes fairly lengthy: https://github.com/onedesign/uptake-craft/blob/dev/craft/templates/_partials/head.html