about summary refs log tree commit diff
path: root/layouts/partials/toc.html
diff options
context:
space:
mode:
Diffstat (limited to 'layouts/partials/toc.html')
-rw-r--r--layouts/partials/toc.html15
1 files changed, 15 insertions, 0 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
new file mode 100644
index 0000000..f6af753
--- /dev/null
+++ b/layouts/partials/toc.html
@@ -0,0 +1,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>