Fixed broken section/page hide feature

This commit is contained in:
David Thurstenson 2021-11-21 13:49:30 -06:00
parent 9ea510e106
commit 2ed69e67b8
3 changed files with 2 additions and 36 deletions

View File

@ -1,5 +1,6 @@
{{ range .Pages }}
{{ if not (isset .Params "hide") }}
{{ with .Params.hide }}
{{ else }}
<article class="post">
<header class="post__header">
<h2><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h2>

View File

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

View File

@ -1,22 +0,0 @@
{{ define "main" }}
<header class="content__header">
<h1>{{ .Title | markdownify }}</h1>
{{ .Content }}
</header>
{{ range .Pages }}
<article class="post">
<header class="post__header">
<h1><a href="{{ .Permalink }}">{{ .Title | markdownify }}</a></h1>
<p class="post__meta">
{{ .Params.author }},
<span class="date">{{ .Date.Format "2 January 2006" }}</span>
</p>
</header>
<section class="post__summary">
{{ .Summary }}
</section>
</article>
{{ end }}
{{ end }}