Skip to content

Escaping a partial #62

@lawlesscreation

Description

@lawlesscreation

I'm trying out a few tools for creating a style guide and Assemble seems to fit the bill but I'm stumbling when trying to implement a key feature. I want to be able include a partial twice with the second one escaped (rendered as text) - similar to how Twitter bootstrap and other styleguides document code:

// layout.hbs

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>{{title}}</title>
    </head>

    <body>
        <div class="container">
            {{> body }}
        </div>
    </body>
</html>
// page.hbs

{{#markdown}}
Some notes about the pattern.
{{/markdown}}

<h2>Example</h2>
{{> alert modifier="warning"  }}

<h2>Code</h2>
// None of these seem to work...
{{{{> alert modifier="warning" }}}}
{{{> alert modifier="warning" }}}
\{{> alert modifier="warning" }}

After scouring Google for Assemble/Handlebars mentions of how to escape a partial, I'm still none the wiser. Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions