{{ $page := . }} {{ if $page.Pages }} {{ if $page.Param "paige.section_pages.full_pages" }} {{ $p := $page.Paginate $page.Pages }}
{{ range $p.Pages }} {{ partial "paige/article.html" (dict "fullpages" true "page" .) }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }}
{{ partial "paige/pagination.html" $page }}
{{ end }} {{ else }} {{ $p := $page.Paginate ($page.Pages.ByPublishDate.Reverse.GroupByPublishDate "January 2006") }}
{{ range $p.PageGroups }}

{{ .Key }}

{{ range .Pages }} {{ $authors := partial "paige/authors.html" . }} {{ $categories := .Params.categories | default slice | uniq }} {{ $commiturl := "" }} {{ $date := .PublishDate }} {{ $dateformat := $page.Param "paige.date.format" | default ":date_long" }} {{ $description := .Description | markdownify }} {{ $draft := .Draft }} {{ $expired := and .ExpiryDate (lt .ExpiryDate now) }} {{ $flags := slice }} {{ $future := and .PublishDate (gt .PublishDate now) }} {{ $modified := and .PublishDate .Lastmod (lt .PublishDate .Lastmod) }} {{ $readingtime := .ReadingTime }} {{ $summary := .Summary | htmlUnescape | plainify }} {{ $tags := .Params.tags | default slice | uniq }} {{ $title := .Title | markdownify }} {{ $titlelink := .RelPermalink }} {{ if and ($page.Param "paige.git.commit_url_prefix") $page.GitInfo }} {{ $commiturl = print ($page.Param "paige.git.commit_url_prefix") $page.GitInfo.Hash }} {{ end }} {{ if $draft }} {{ $flags = $flags | append "paige-draft" "paige-unpublished" }} {{ end }} {{ if $expired }} {{ $flags = $flags | append "paige-expired" "paige-unpublished" }} {{ end }} {{ if $future }} {{ $flags = $flags | append "paige-future" "paige-unpublished" }} {{ end }} {{ if $modified }} {{ $flags = $flags | append "paige-modified" }} {{ end }} {{ if not (or $draft $expired $future) }} {{ $flags = $flags | append "paige-published" }} {{ end }} {{ $flags = delimit ($flags | uniq) " " }} {{ $class := delimit (slice "mb-3" "paige-page" "w-100" | append $flags | uniq | sort) " " }}
{{ with $title }}

{{ . }}

{{ end }} {{ with $description }}

{{ . }}

{{ end }} {{ with $summary }}

{{ . }}

{{ end }} {{ if or $categories $tags }}

{{ $terms := slice }} {{ range $categories }} {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "categories/%v/" | relLangURL)) }} {{ end }} {{ range $tags }} {{ $terms = $terms | append (dict "name" . "url" (lower . | printf "tags/%v/" | relLangURL)) }} {{ end }} {{ range sort $terms "name" }} {{ .name }} {{ end }}

{{ end }} {{ with $authors }}

{{ . }}

{{ end }} {{ with $date }}

{{ with $commiturl }} {{ end }} {{ if $commiturl }} {{ end }}

{{ end }} {{ with $readingtime }}

{{ . }} {{ i18n "paige_minutes" . }}

{{ end }}
{{ end }} {{ end }}
{{ if or $p.HasPrev $p.HasNext }}
{{ partial "paige/pagination.html" $page }}
{{ end }} {{ end }} {{ end }}