Pattern Partials
A partial is a pattern included within another pattern. To do this, you can use:
- the shorthand include syntax
- the relative path to the partial
- the relative path minus the pattern extension
Shorthand Include Syntax
The shorthand include syntax uses the following format:
[patternType]-[patternName]
For example, the shorthand include syntax for:
00-elements/01-images/02-landscape.mustache
would be:
{{> atoms-landscape }}
The pattern type matches elements
. The pattern name matches landscape
from the filename. Any digits used for ordering are dropped from both the pattern type and pattern name. Pattern subtypes are never part of the shorthand include syntax. This way, patterns can be reorganized within a pattern type and/or by using digits without needing to change your include statements.
Full Relative Path
If you want specificity (or need to trigger specialized Templater behavior) when including partials, you can use the full relative path from just below source/_patterns
:
{{> 00-elements/01-images/02-landscape.mustache }}
Relative Path Minus Pattern Extension
Leaving out the pattern extension from the relative path also works:
{{> 00-elements/01-images/02-landscape }}