Closed cyril-lamotte closed 9 years ago
You need to add some ruby code as well. You should have to create a html_color_renderer.rb
in the code_example_renderers
folder. See the example here: https://github.com/trulia/hologram#custom-code-example-renderers
In addition, in your scss file, the example should be an html_color_example
, not html_example_color
.
1/ I created _html_colorrenderer.rb :
Hologram::CodeExampleRenderer::Factory.define('color') do
example_template 'color_template'
end
Is it correct ?
2/ color_template.html.erb
3/ Added comment In SASS :
/*doc
---
title: Colors
name: brand
category: Colors
---
``html_color_example
#3a65c4
``
*/
Where do you think I'm wrong ?
Ok it's color_example
/*doc
---
title: Colors
name: brand
category: Colors
---
``color_example
#3a65c4
``
*/
First, "great job" for this project !
Then, I don't understand how to add custom template
I created _colortemplate.html.erb but I don't see how to apply it. Do I need to code in ruby ?
In my Scss code :
Is
html_example_color
correct ?