Releases: odopod/style-guide
Releases · odopod/style-guide
v2.0.0
v1.4.0
You can now use "demo-file"
within the "docs-demo"
field to reference a file to be include
d by nunjucks for the demo instead of writing the markup in JSON. For example:
"docs-demo": {
- "demo-markup": "'<a href=\"javascript:void(0)\" class=\"btn\">Sign In</a>'"
+ "demo-file": "'demos/btn.html'"
},
The demos/btn.html
file will need to exist within the nunjucks searchPaths
, so make sure you have the templatePath
option defined. For example, if in the example above the demo template path was style-guide-templates/demos/btn.html
, you would configure the style guide like this:
const path = require('path');
styleguide.configure({
…
templatePath: path.resolve('./style-guide-templates'),
…
});