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

This commit is contained in:
David Thurstenson 2021-10-05 22:47:26 -05:00
parent 95130c711a
commit 431fa243b2
3 changed files with 21 additions and 16 deletions

View File

@ -2,4 +2,5 @@
title: "About"
description: "Contact info, portfolio, etc"
draft: false
hide: true
---

View File

@ -1,11 +1,13 @@
{{ range .Pages }}
<article class="post">
<header class="post__header">
{{ if not (isset .Params "hide") }}
<article class="post">
<header class="post__header">
<h2><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
</header>
</header>
<section class="post__summary">
<section class="post__summary">
{{ .Description }}
</section>
</article>
</section>
</article>
{{ end }}
{{ end }}

View File

@ -1,11 +1,13 @@
{{ range .Sections }}
<article class="post">
<header class="post__header">
{{ if not (isset .Params "hide") }}
<article class="post">
<header class="post__header">
<h2><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>
</header>
</header>
<section class="post__summary">
<section class="post__summary">
{{ .Description }}
</section>
</article>
</section>
</article>
{{ end }}
{{ end }}