Hidden Patterns
To remove a pattern from the UI menu and "View All" pages, add an underscore (_
) to the beginning of the pattern name. For example, consider a sound file that isn't meant to be displayed:
compounds/media/_sound-file.mustache
This pattern can be included normally as a partial of any pattern. However, it will not be navigable as a stand-alone pattern.
Another use-case is for multiple pseudo-patterns without a primary non-variant pattern.
_primary-color.mustache
<div style="background-color: {{ color }};"> </div>
primary-color~red.json
{
"color": #f00;
}
primary-color~green.json
{
"color": #0f0;
}
primary-color~blue.json
{
"color": #00f;
}
Note that the .json
files are not prepended by underscores.