From a4d0e1406977f48b26d97da05b196c3fabb96499 Mon Sep 17 00:00:00 2001
From: Alexander Bilz <mail@alexbilz.com>
Date: Fri, 18 Nov 2022 15:34:49 +0000
Subject: [PATCH] refactor: implement toc as partial (#383)
---
layouts/_default/single.html | 3 +--
layouts/partials/toc.html | 2 ++
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index da8f295..f1c6d21 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -45,8 +45,7 @@
{{- partial "expirationnote.html" . -}}
{{- if (eq .Params.toc true) -}}
- <h3>Table of Contents</h3>
- {{ .TableOfContents }}
+ {{- partial "toc.html" . -}}
{{- end -}}
{{ .Content }}
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
new file mode 100644
index 0000000..d20c456
--- /dev/null
+++ b/layouts/partials/toc.html
@@ -0,0 +1,2 @@
+<h3>Table of Contents</h3>
+{{ .TableOfContents }}
--
Gitblit v1.10.0