{{- define "main" -}} {{- $absURL := "" | absURL -}} {{- $limit := .Site.Config.Services.RSS.Limit -}} {{- if lt $limit 1 -}} {{- $limit = .Paginator.TotalNumberOfElements -}} {{- end -}} {{- $lastBuildDate := now | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}} {{- if not .Date.IsZero -}} {{- $lastBuildDate = .Date | time.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML -}} {{- end -}} {{- $title := partial "head-title.html" . -}} {{- $description := partial "head-title.html" . -}} {{- $author := partial "function-authors-data.html" . -}} {{- $image := print "/favicon.ico" -}} {{- if (eq .Page.Kind "section") -}} {{- $title = $author.name -}} {{- $description = $author.description | markdownify | html | htmlUnescape -}} {{- $image = print "/" (partial "function-paths.html").media "/" .Section "/" .Section "-profile" (path.Ext $author.picture.profile) -}} {{- end -}} {{- if (eq .Page.Type "tags") -}} {{- $title = print "#" (lower .Title) " -- " .Site.Title | markdownify | htmlUnescape -}} {{- $description = print .Site.Title " Tags: #" .Title -}} {{- end -}} {{- $atomSelf := "" -}} {{- $atomPrevious := "" -}} {{- $atomNext := "" -}} {{- with .OutputFormats.Get "RSS" -}} {{- $atomSelf = printf `` .Permalink .MediaType | safeHTML -}} {{- with $.Paginator.Prev -}} {{- $atomPrevious = printf `` (.URL | absURL) | safeHTML -}} {{- end -}} {{- with $.Paginator.Next -}} {{- $atomNext = printf `