about summary refs log tree commit diff
path: root/layouts/partials/toc.html
blob: f6af75325c896b895bab59732a4a60701b730057 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
{{ $chapters := .Page.Pages }}
{{ range .Page.Translations }}
{{ $chapters = $chapters | lang.Merge .Pages }}
{{ end}}
<ol>
  {{ range sort $chapters "Weight" }}
  <li>
    <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a>
    {{ partial "post-info.html" . }}
    {{ if .IsSection}}
      {{ partial "toc.html" . }}
    {{ end }}
  </li>
  {{ end }}
</ol>