Skip to content

Commit

Permalink
Use the group by year var in the term partial
Browse files Browse the repository at this point in the history
  • Loading branch information
igalarzab authored Mar 7, 2022
1 parent 2ceab5d commit 99e9038
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/_default/term.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ <h1 class="mt-0 text-4xl font-extrabold text-neutral-900 dark:text-neutral">{{ .
{{ end }}
<section>
{{ range (.Paginate (.Pages.GroupByDate "2006")).PageGroups }}
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
<hr class="border-dotted border-neutral-400 w-36" />
{{ if $.Params.groupByYear | default ($.Site.Params.list.groupByYear | default true) }}
<h2 class="mt-12 text-2xl font-bold first:mt-8">{{ .Key }}</h2>
<hr class="border-dotted border-neutral-400 w-36" />
{{ end }}
{{ range .Pages }}
{{ partial "article-link.html" . }}
{{ end }}
Expand Down

0 comments on commit 99e9038

Please sign in to comment.