{{- $items := slice -}} {{- range where site.RegularPages "Section" "in" (slice "posts" "projects" "apps") -}} {{- $description := .Description | default (.Summary | plainify) -}} {{- $section := title .Section -}} {{- if eq .Section "apps" }}{{ $section = "Projects" }}{{ end -}} {{- $items = $items | append (dict "title" .Title "link" .Permalink "guid" .Permalink "date" .Date "section" $section "description" $description ) -}} {{- end -}} {{- range hugo.Data.publications -}} {{- $parts := slice -}} {{- with .authors }}{{ $parts = $parts | append . }}{{ end -}} {{- with .venue }}{{ $parts = $parts | append . }}{{ end -}} {{- $link := ("/publications/" | absURL) -}} {{- with .links }}{{ with index . 0 }}{{ $link = .url }}{{ end }}{{ end -}} {{- $items = $items | append (dict "title" .title "link" $link "guid" $link "date" (time.AsTime (printf "%v-01-01T00:00:00Z" .year)) "section" "Publications" "description" (delimit $parts ". ") ) -}} {{- end -}} {{- $items = sort $items "date" "desc" -}} {{- $latest := now -}} {{- with index $items 0 }}{{ $latest = .date }}{{ end -}} {{- printf "" | safeHTML }} {{ site.Title | html }} {{ site.Home.Permalink }} {{ site.Params.description | html }} Hugo {{ site.Language.Locale | default "en-us" }} {{ $latest.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} {{ range $items }} {{ .title | html }} {{ .link }} {{ .date.Format "Mon, 02 Jan 2006 15:04:05 -0700" }} {{ .guid }} {{ .section | html }} {{ .description | plainify | html }} {{ end }}