diff --git a/layouts/partials/widget/archives.html b/layouts/partials/widget/archives.html index de80ee5..82bdbf5 100644 --- a/layouts/partials/widget/archives.html +++ b/layouts/partials/widget/archives.html @@ -9,20 +9,16 @@ {{ $filtered := ($pages | intersect $notHidden) }} {{ $archives := $filtered.GroupByDate "2006" }} - {{ range first .Site.Params.widgets.archives.limit ($archives) }} - {{ $id := lower (replace .Key " " "-") }} + {{ range $index, $item := first (add .Site.Params.widgets.archives.limit 1) ($archives) }} + {{- $id := lower (replace $item.Key " " "-") -}}
- {{ .Key }} - {{ len .Pages }} - -
- {{ end }} - - {{ if gt (len $archives) .Site.Params.widgets.archives.limit }} -
- - {{ T "widgetArchivesMore" }} + {{ if eq $index $.Site.Params.widgets.archives.limit }} + {{ T "widgetArchivesMore" }} + {{ else }} + {{ .Key }} + {{ len $item.Pages }} + {{ end }}
{{ end }}