Let’s rethink our current module architecture and how we have the partials laid out. In the entry, is has multiple components. Right? It has the following components:
- entry header which has the entry title, post meta, and featured image
- entry content
- entry footer which has the post meta, typically for categories and tags
It seems easier if you have a partial for each of these components. Why? Remember that this is your codebase. Therefore, it is your starting point on all jobs and theme builds. Having a partial for all the components gives you flexibility for all of the needs you’ll have. You simply comment out what you don’t need. There are other strategies too, such as loading a configuration file to turn on and off various partials. But for now, let’s keep it simple.
In this episode then, let’s break sub-modules and then component partials. Then let’s break up the styles into the appropriate buckets. We’ll discuss a few alternative strategies for you to decide what works best for you and your codebase.
Psst….sorry it’s so long, but there is a lot to cover in rethinking the architecture, exploring the alternatives, and then breaking up the content.
Your functions are bloated. Put them on a diet. Think "skinny" and "as few lines as possible."
Total Lab Runtime: 00:48:48