diff --git a/layouts/partials/blog/archive.html b/layouts/partials/blog/archive.html index eaba407..fc61331 100644 --- a/layouts/partials/blog/archive.html +++ b/layouts/partials/blog/archive.html @@ -1,18 +1,19 @@
- {{ $prev := 2100}} - {{range .Pages.ByPublishDate.Reverse}} - {{if .Date}} - {{$curr := .Date.Format "2006"}} - {{if gt $prev ($curr)}} -

{{ $curr }}

- {{end}} -
  • - {{ if .Params.date }} - {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} - - {{ end }} - {{ .Title | markdownify }} -
  • - {{ $prev = $curr}} + {{ $prev := now.Format "2006"}} +

    {{ $prev }}

    + {{range .Pages.ByPublishDate.Reverse}} + {{if .Date}} + {{$curr := .Date.Format "2006"}} + {{if lt $curr $prev }} +

    {{ $curr }}

    {{end}} - {{end}} +
  • + {{ if .Params.date }} + {{ .Date.Format (.Site.Params.dateFormat | default "Jan 02, 2006") }} - + {{ end }} + {{ .Title | markdownify }} +
  • + {{ $prev = $curr}} + {{end}} + {{end}}