From 0e4025a2d979ac0a5c80d3bdc4874f1dd00afaf6 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Tue, 28 Sep 2021 18:36:14 -0500 Subject: [PATCH] Table of contents defaults to false --- archetypes/blog.md | 1 + archetypes/default.md | 1 + layouts/_default/baseof.html | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/archetypes/blog.md b/archetypes/blog.md index a873a97..4007b7a 100644 --- a/archetypes/blog.md +++ b/archetypes/blog.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .Name "-" " " | title }}" date = "{{ .Date }}" +toc = true draft = true description = """ diff --git a/archetypes/default.md b/archetypes/default.md index b1a6dd7..cf0eb17 100644 --- a/archetypes/default.md +++ b/archetypes/default.md @@ -1,6 +1,7 @@ +++ title = "{{ replace .Name "-" " " | title }}" menu = "main" +toc = true description = """ Lorem ipsum diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 7b2e05d..ecf45c5 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -8,7 +8,7 @@ {{ partial "navbar.html" . }}
- {{ if and (ne .Params.Toc false) .IsPage }} + {{ if and .Params.Toc .IsPage }}

Table of Contents

{{ .TableOfContents }}