<!doctype html>
<html>
<head>
    <title>{{ meta.title }}</title>
    <style>
        
        body {
            margin: 0;
            font-family: sans-serif;
            color: #333;
        }

        .content {
            max-width: 38em;
            margin-left: auto;
            margin-right: auto;
            padding-top: 2em;
            padding-bottom: 2em;
            overflow: hidden;
        }
        .data {
            background: #eee;
            color: #444;
            padding: .5em 1em;
        }

        dl dl {
            padding-left: 2em;
        }
    </style>
</head>
<body>
    <div class="content">
        <h1>{{ meta.title }}</h1>

        {% macro iterate(data) %}
            {% for key, val in data.iteritems() recursive %}
                {% if loop.firsrt %}<dl>{% endif %}
                <dt>{{ key }}:</dt>
                <dd>
                    {% if val is mapping %}
                        <dl>
                            {{ loop(val.iteritems()) }}
                        </dl>
                    {% else %}
                        {{ val }}
                    {% endif %}
                </dd>
                {% if loop.last %}</dl>{% endif %}
            {% endfor %}
        {% endmacro %}

        {{ data.content|markdown }}

        <div class="data">
            <h5>These variables are available in your templates:</h5>
            <h3>meta</h3>
            {{ iterate(meta) }}
            <h3>data</h3>
            {{ iterate(data) }}
            <h3>site</h3>
            {{ iterate(site) }}
            <h3>extensions</h3>
            {{ iterate(site) }}
        </div>
        
    </div>
</body>
</html>