From 99dc3365eb50f09b4995c2c6ed930a4eb8d6deb2 Mon Sep 17 00:00:00 2001 From: Jesper Kolbeck Date: Tue, 7 Dec 2021 16:35:06 +0100 Subject: [PATCH 1/4] Add both first and last classes when only one page (#43) --- layouts/index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layouts/index.html b/layouts/index.html index 9f3daa3..8096ce5 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -21,7 +21,7 @@ {{ range $index_val, $elem_val := $sections }}
-
+

{{ .Title }}

From 8171dde83b5b5e5417f5912219f5376681c2424d Mon Sep 17 00:00:00 2001 From: Jan Raasch Date: Tue, 7 Dec 2021 17:21:24 +0100 Subject: [PATCH 2/4] fix: do not render drafts on homepage Fixes #39 --- layouts/index.html | 1 + 1 file changed, 1 insertion(+) diff --git a/layouts/index.html b/layouts/index.html index 8096ce5..d66bf9e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -1,6 +1,7 @@ {{ define "main" }} {{ $headless := .Site.GetPage "/homepage" }} {{ $sections := $headless.Resources.ByType "page" }} +{{ $sections := cond .Site.BuildDrafts $sections (where $sections "Draft" "==" false) }}