mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-03-29 04:23:34 +01:00
20 lines
467 B
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 %}
|