From e5392541539ccea8f890b47c6e88b26b99ecee8a Mon Sep 17 00:00:00 2001 From: dasvh <131653108+dasvh@users.noreply.github.com> Date: Mon, 1 May 2023 06:34:46 +0000 Subject: [PATCH 1/2] added shortcode for table of contents --- layouts/shortcodes/toc.html | 1 + 1 file changed, 1 insertion(+) create mode 100644 layouts/shortcodes/toc.html diff --git a/layouts/shortcodes/toc.html b/layouts/shortcodes/toc.html new file mode 100644 index 0000000..aca3785 --- /dev/null +++ b/layouts/shortcodes/toc.html @@ -0,0 +1 @@ +{{ .Page.TableOfContents }} \ No newline at end of file From 185724ddbb0c752759b5663ec4af7f2590b1efda Mon Sep 17 00:00:00 2001 From: dasvh <131653108+dasvh@users.noreply.github.com> Date: Mon, 1 May 2023 06:37:15 +0000 Subject: [PATCH 2/2] added .TableOfContents variable to the single.html --- layouts/_default/single.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 4dc326a..dee40d1 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,6 +2,11 @@

{{ .Title | markdownify }}

+ {{ if .Params.toc }} + + {{ end }}
{{ .Content }}