frctl / fractal-docs

📝 VuePress powered site and documentation for Fractal
https://fractal.build
12 stars 17 forks source link

Document specifying a component as collator #81

Open mihkeleidast opened 3 years ago

mihkeleidast commented 3 years ago

It's possible to specify a component as collator, but it is not documented. See frctl/fractal#593 for reference.

For example, in config:

module.exports = {
    collated: true,
    collator: '@my-collator',
    variants: [...]
};

And my-collator.hbs:

{{#each _variants}}
    {{{ this.markup }}}
    {{ this.item }}
{{/each}}

Needs to mention:

This should allow full customization of the collator, including using the path helper, since it'll be rendered through the engine.