From c95051b93d756d5653ebe36a8f5f2d556b3843a0 Mon Sep 17 00:00:00 2001 From: lberki Date: Thu, 5 May 2022 11:08:42 +0200 Subject: Add table of contents Add table of contents See #64 --- layouts/_default/single.html | 4 +++- layouts/partials/toc.html | 13 +++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 layouts/partials/toc.html (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index dba8344..f5f6f6e 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -1,7 +1,9 @@ {{ define "main" }}
-
+ {{ partial "toc.html" . }} + +
{{ partial "single/post-info.html" . }} {{ partial "single/title.html" . }} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..81d524a --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,13 @@ +{{ if .Params.toc }} + +{{ end }} -- cgit v1.2.3