{{- define "title" -}} {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) -}} {{- if .Site.Params.withSiteTitle }} {{ .Site.Params.titleDelimiter }} {{ .Site.Title }}{{- end -}} {{- end -}} {{- define "content" -}}
{{- /* Title */ -}}

{{- $titleIcon := "fa-solid fa-feather" -}} {{- with .Params.titleIcon -}} {{- $titleIcon = . -}} {{- end -}} {{- dict "Class" (add $titleIcon " me-1") | partial "plugin/icon.html" -}} {{- title (.Params.Title | default ((T .Section) | default .Section | dict "Some" | T "allSome")) }} {{ .Pages.Len }}

{{- /* Total word count */ -}} {{- /* See https://github.com/hugo-fixit/FixIt/issues/124 */ -}} {{- $localData := newScratch -}} {{- range .Pages -}} {{- $localData.Add "totalWordCount" .WordCount -}} {{- end -}} {{- with ($localData.Get "totalWordCount") -}} {{- $humanizedNum := . -}} {{- if ge $humanizedNum 1000 -}} {{- $humanizedNum = printf "%.2fK" (div $humanizedNum 1000.0) -}} {{- end -}}

{{- dict "Class" "fa-regular fa-keyboard" | partial "plugin/icon.html" }} {{ T "section.totalWordCount" (dict "Count" $humanizedNum) -}}

{{- end -}}
{{- /* Paginate */ -}} {{- if .Pages -}} {{- $pages := .Pages.GroupByDate "2006" -}} {{- with .Site.Params.section.paginate | default .Site.Params.paginate -}} {{- $pages = $.Paginate $pages . -}} {{- else -}} {{- $pages = .Paginate $pages -}} {{- end -}} {{- partial "section/recently-updated.html" . -}} {{- range $pages.PageGroups -}}

{{- dict "Class" "fa-regular fa-calendar me-1" | partial "plugin/icon.html" -}} {{- .Key -}}

{{- range .Pages -}}
{{- $repost := .Params.repost | default dict -}} {{- if eq $repost.enable true -}} {{- dict "Class" "fa-solid fa-share text-success me-1" | partial "plugin/icon.html" -}} {{- end -}} {{- cond (.Param "capitalizeTitles") (title .LinkTitle) .LinkTitle -}} {{- .Date | dateFormat ($.Site.Params.section.dateFormat | default "01-02") -}}
{{- end -}} {{- end -}} {{- partial "layout/paginator.html" . -}} {{- end -}}
{{- end -}}