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

github.com/janraasch/hugo-scroll.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Raasch <jan@janraasch.com>2021-12-07 19:21:24 +0300
committerJan Raasch <jan@janraasch.com>2021-12-07 19:21:24 +0300
commit8171dde83b5b5e5417f5912219f5376681c2424d (patch)
tree35b8c7067cd1183f586e980a2051c10a7d3fb2a7
parent99dc3365eb50f09b4995c2c6ed930a4eb8d6deb2 (diff)
fix: do not render drafts on homepage
Fixes #39
-rw-r--r--layouts/index.html1
1 files changed, 1 insertions, 0 deletions
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) }}
<header id="site-head" {{ with .Params.header_image }}style="background-image: url({{ . }})"{{ end }}>
<div class="vertical">
<div id="site-head-content" class="inner">