tilde-site/templates/includes/page-navigation.html

17 lines
347 B
HTML

<nav>
<h2>On this page</h2>
{% if page %}
{% set toc = page.toc %}
{% elif section %}
{% set toc= section.toc %}
{% endif %}
<ul>
<li><a href="#main">Top</a></li>
{% for h1 in toc %}
<li><a href="{{h1.permalink | safe }}">{{ h1.title }}</a></li>
{% endfor %}
<li><a href="#footer">Footer</a></li>
</ul>
</nav>