hologram
hologram copied to clipboard
Reference variables in output
Is it possible to access example-specific variables in my out put file? For example, here is my output file now:
<div class="codeExample">
<div class="exampleOutput">
<%= rendered_example %>
</div>
<div class="codeBlock">
<div class="highlight">
<pre>
<code><%= code_example %></code>
</pre>
</div>
</div>
Can I do something like the following:
<div class="codeExample">
<div class="exampleOutput <%= name %>">
<%= rendered_example %>
</div>
<div class="codeBlock">
<div class="highlight">
<pre>
<code><%= code_example %></code>
</pre>
</div>
</div>
Which introduces an example-specific class into each code block? So maybe this would say typography if my .scss file shows:
/*doc
---
title: Typography
name: typography
category: foundations
---
:+1:
Did anyone find a solution for this? I would love to include the name
variable in the rendered template files.