From 431fa243b2f83060bb53e178d257990d82877f35 Mon Sep 17 00:00:00 2001 From: David Thurstenson Date: Tue, 5 Oct 2021 22:47:26 -0500 Subject: [PATCH] Added 'hide' front-matter option to hide page or section from displaying in the list even if it's not a draft, and set hide: true for the about section --- content/about/_index.md | 1 + layouts/partials/postlist.html | 18 ++++++++++-------- layouts/partials/sectionlist.html | 18 ++++++++++-------- 3 files changed, 21 insertions(+), 16 deletions(-) diff --git a/content/about/_index.md b/content/about/_index.md index 265000e..d743686 100644 --- a/content/about/_index.md +++ b/content/about/_index.md @@ -2,4 +2,5 @@ title: "About" description: "Contact info, portfolio, etc" draft: false +hide: true --- diff --git a/layouts/partials/postlist.html b/layouts/partials/postlist.html index 4a0b7e8..714ea05 100644 --- a/layouts/partials/postlist.html +++ b/layouts/partials/postlist.html @@ -1,11 +1,13 @@ {{ range .Pages }} -
-
-

{{ .Title | markdownify }}

-
+ {{ if not (isset .Params "hide") }} + +
+ {{ .Description }} +
+
+ {{ end }} {{ end }} diff --git a/layouts/partials/sectionlist.html b/layouts/partials/sectionlist.html index d5858ce..090e6d5 100644 --- a/layouts/partials/sectionlist.html +++ b/layouts/partials/sectionlist.html @@ -1,11 +1,13 @@ {{ range .Sections }} -
-
-

{{ .Title | markdownify }}

-
+ {{ if not (isset .Params "hide") }} + +
+ {{ .Description }} +
+
+ {{ end }} {{ end }}