{{ section.title }}
{{ section.content | safe }}
{% set index_path = current_path ~ "_index.md" | trim_start_matches(pat="/") %}
{% set index = get_section(path=index_path) %}
{% for page in index.pages %}
{{ self::page_card(permalink=page.permalink, title=page.title) }}
{% endfor %}
{% for s in index.subsections %}
{% set subsection = get_section(path=s) %}
{% if subsection.pages %}
{% for page in subsection.pages %}
{{ self::page_card(permalink=page.permalink, title=page.title) }}
{% endfor %}
{% endif %}
{% endfor %}
{# TODO maybe there is a better way to do this. #}
{{ self::page_card(permalink="/docs/dev", title="Developer Docs") }}