Fixed broken section/page hide feature
This commit is contained in:
parent
9ea510e106
commit
2ed69e67b8
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
|
@ -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 }}
|
Loading…
Reference in New Issue