Menu icon Foundation
Handlebars partials inside Style Sherpa's markdown

Is there a way to render Handlebars partials inserted inside the markdown file? This could help to automate the process of writing and updating the styleguide.

Currently, inserting a partial variable just renders as plain text.

I first tried to register the partials, as Style Sherpa doesn't use Panini and his declared paths, but marked.js instead. Still, it doesn't work, so I guess this comes from the marked.js output.

If so, can it be customized? I can't find anything upon markdown on the plugin documentation. Or would anyone know any other way to make it work?

 

Thanks,

Tommy

sherpaHandlebarsmarkdownstyleguidemarked.js

Is there a way to render Handlebars partials inserted inside the markdown file? This could help to automate the process of writing and updating the styleguide.

Currently, inserting a partial variable just renders as plain text.

I first tried to register the partials, as Style Sherpa doesn't use Panini and his declared paths, but marked.js instead. Still, it doesn't work, so I guess this comes from the marked.js output.

If so, can it be customized? I can't find anything upon markdown on the plugin documentation. Or would anyone know any other way to make it work?

 

Thanks,

Tommy

Rafi Benkual almost 3 years ago

I recently longed for this feature on a project as well. Right now you would piece together the components without partials. Sylesherpa moves the SCSS over so it's available. Panini though is not processed in the styleguide though. It would take a re-work of some of the structure.

I would start by making this feature request on both the Foundation for Sites GitHub and the Emails gitHub so that it can be added to the project roadmaps.