Browse Source

only show labels if posts exist

simplify
Alexander Avery 2 months ago
parent
commit
86a069e5ef
  1. 8
      layouts/_default/list.html

8
layouts/_default/list.html

@ -12,20 +12,20 @@
{{- end }}
</main>
{{ with $pages.Limit 4 }}
<section>
<h2>Latest Posts:</h2>
{{ with $pages.Limit 4 }}
<section class="article-list">
{{ range . }}
{{ partial "article.html" . }}
{{ end }}
</section>
{{ end }}
</section>
{{ end }}
{{ with $pages }}
<section>
<h2>All Posts:</h2>
{{ with $pages }}
{{ range .GroupByDate "2006" }}
<p>{{ .Key }}</p>
<ul>
@ -34,8 +34,8 @@
{{ end -}}
</ul>
{{ end }}
{{ end }}
</section>
{{ end }}
{{ end }}

Loading…
Cancel
Save