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

17 lines
347 B
HTML
Raw Permalink Normal View History

2023-01-25 08:55:24 +00:00
<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>