Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reference variables in output #230

Open
bradryanbice opened this issue May 13, 2015 · 2 comments
Open

Reference variables in output #230

bradryanbice opened this issue May 13, 2015 · 2 comments

Comments

@bradryanbice
Copy link

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

---
@ryanmclaughlin
Copy link

👍

@sonniesedge
Copy link

Did anyone find a solution for this? I would love to include the name variable in the rendered template files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants