Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/lxndrblz/anatole.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Bilz <mail@alexbilz.com>2022-09-28 20:48:07 +0300
committerAlexander Bilz <mail@alexbilz.com>2022-09-28 20:48:07 +0300
commit80ac09e4bccc060b7194ccfb09e9d64e10a1a6a2 (patch)
tree19313477356aeb677b603d86307403020b1d1ba4
parent57fa00a03357f0ecca94e671c25b553429626457 (diff)
feat: refactor toc as partialfeat/tocaspartial
-rw-r--r--layouts/_default/single.html3
-rw-r--r--layouts/partials/toc.html2
2 files changed, 3 insertions, 2 deletions
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index ddef496..90f4aff 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -59,8 +59,7 @@
{{- partial "expirationnote.html" . -}}
{{- if (eq .Params.toc true) -}}
- <h3>Table of Contents</h3>
- {{ .TableOfContents }}
+ {{- partial "toc.html" . -}}
{{- end -}}
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 }}