Closed Cleecanth closed 9 years ago
Done! Just pushed version 2.0.4
Update the tool and add your custom variables in your .styleguide
file like:
customVars: {
sampleVar: 'Hello from customVars!'
},
and then request them from the handlebars template
{{customVars/sampleVar}}
(any new project you styleguide init
in will have a sample variable set in the .styleguide
file)
Works?
Yep, that works for me. Thanks, man.
First, I just want to thank you. This is exactly what I was looking for (and came unbelievably close to trying to create on my own). So, thank you for this — you've saved me numerous hours and answered like 30 of my prayers.
That said, it would be nice to be able to define custom handlebars variables within the
.styleguide
file for use within thetemplate.html
.As a very simple example, within the
.styleguide
, if you could do something like:and in
template.html
:You could obviously do a whole lot more. But the general idea is that you'd be making your template more portable (for use across projects).