<nav class="navigation">
  <!-- If new pages are added to the site and the TOC needs to be updated, it
  can be overridden, using toc-mapping.yml -->
  {% assign tocTemplateName = site.data.toc-mapping[page.version] %}
  {% if tocTemplateName == null %}
    {% assign tocTemplateName = 'default' %}
  {% endif %}
  {% assign toc = site.data[tocTemplateName].toc %}

  {% for item in toc %}
  <h3>{{ item.title }}</h3>
  <ul>
    {% for entry in item.subfolderitems %}
    <li>
      {% if entry.github %}
        <a href="{{ entry.url | prepend: page.gh }}" target="_blank">{{ entry.page }}</a>
      {% else %}
        <a href="{{ entry.url | prepend: page.version | prepend: "/docs/" | relative_url }}">{{ entry.page }}</a>
      {% endif %}
    </li>
    {% endfor %}
  </ul>
  {% endfor %}
</nav>
