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" title: "About"
description: "Contact info, portfolio, etc" description: "Contact info, portfolio, etc"
draft: false draft: false
hide: true
--- ---

View File

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

View File

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