You can create section blueprints (predefined sections) for pages, files and fields, which you can reuse in your blueprints.
Let's look at an example for a section of type: pages. Suppose you want to have multiple page lists in the blog.yml blueprint for drafts, unlisted and listed articles. Instead of defining the same section over and over again, you can create a basic section definition like this:
In your blog.yml blueprint, you can now create different pages sections based on this section blueprint:
In the example, we have created three sections that extend the articles section blueprint, one for drafts, one for unlisted subpages and one for listed subpages.
In the same way, you can create a files section:
And reuse it in your blueprint:
Check out the Starterkit section and page blueprints for more examples of section reuse.
Instead of repeating yourself and adding the same tab configuration to multiple blueprints, you can keep single tab definitions in /site/blueprints/tabs and reuse them in every blueprint. A typical use case would be a SEO tab that always contains the same fields.
Let's start with the SEO tab mixin:
This is how you can use it in a blueprint:
You can see how this instantly reduces your blueprint code and leaves you with the customized parts for each blueprint type. Using such tab mixins extensively will clean your blueprints, and also makes it a lot easier to maintain them afterwards.
If you want to overwrite parts of the mixin you can use the extends option instead.