[go: up one dir, main page]

tera 0.11.13

Template engine based on Jinja2/Django templates
Documentation
{% extends "index.html" %}

{% block hero %}
{% endblock hero %}

{% block content %}
    <div class="container">
        <aside class="docs__sidebar">
            <ul>
                {% set section = get_section(path="docs/_index.md") %}
                {% for page in section.pages | reverse %}
                    {% for h1 in page.toc %}
                        <li>
                            <a href="{{ h1.permalink }}">{{ h1.title }}</a>
                            {% if h1.children %}
                                <ul>
                                    {% for h2 in h1.children %}
                                        <li><a href="{{ h2.permalink }}">{{ h2.title }}</a></li>
                                    {% endfor %}
                                </ul>
                            {% endif %}
                        </li>
                    {% endfor %}
                {% endfor %}
            </ul>

        </aside>
        <div class="docs__content">
            {% block doc_content %}
                {{ section.content | safe }}
            {% endblock doc_content %}
        </div>
    </div>
{% endblock content %}