computer-playbook/sphinx/_templates/local_md_files.html

20 lines
467 B
HTML

{% macro render_headings(headings) %}
<ul>
{% for item in headings %}
<li>
<a href="{{ pathto(item.link).replace("#", "") + '#' + item.anchor }}">{{ item.text }}</a>
{% if item.children %}
{{ render_headings(item.children) }}
{% endif %}
</li>
{% endfor %}
</ul>
{% endmacro %}
{% if local_md_headings %}
<div class="local-md-headings">
<h3>Page Headings</h3>
{{ render_headings(local_md_headings) }}
</div>
{% endif %}