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.html6
1 files changed, 5 insertions, 1 deletions
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
index f6af753..607e7f0 100644
--- a/layouts/partials/toc.html
+++ b/layouts/partials/toc.html
@@ -5,7 +5,11 @@
 <ol>
   {{ range sort $chapters "Weight" }}
   <li>
-    <a href="{{ .RelPermalink }}">{{ trim .Title " " }}</a>
+    {{ $fullTitle := .Title }}
+    {{ with .Params.chapterName }}
+      {{ $fullTitle = printf "%s – %s" $fullTitle . }}
+    {{ end }}
+    <a href="{{ .RelPermalink }}">{{ trim $fullTitle " " }}</a>
     {{ partial "post-info.html" . }}
     {{ if .IsSection}}
       {{ partial "toc.html" . }}