holidaypirates / nucleus

Nucleus is a living style guide generator for atomic css based components. It's a Node application parsing the source SCSS files and reading information from DocBlock annotations.
https://holidaypirates.github.io/nucleus/
MIT License
474 stars 43 forks source link

Use .html templates in the @markup #45

Open dsteinel opened 7 years ago

dsteinel commented 7 years ago

Hey,

to keep the styleguide living, it would be awesome to import a html file within the @markup annotation instead of hardcoding/duplicating it. Like that you would be able to define more complex structures and keep the documentation within the scss quite short, cause no markup has to be written there. And if the structure changes, you only have to adjust it in your html which you are actually using.

/**
 * @structure Header
 * @description
 *  Nice looking header with a navigation bar
 * @markup 
 *  @{include:header.html}
*/

Are there any plans for that so far?

gotofritz commented 7 years ago

We had the same problem, so we forked the project and added a @{template: path} substitution. Hopefully they'll accept the PR, if not you can find our fork here: https://github.com/wcm-io-frontend/nucleus/tree/template