{{ define "main" }}

{{ if .IsHome }}ARCHIVE{{ else }}{{ .Title | upper }}{{ end }}

~/{{ .Section | default "posts" }} $ ls -la • {{ len .Pages }} entries

{{- $tags := .Site.Taxonomies.tags }} {{- $currentTag := .Data.Term }} {{- with $tags }}
FILTER: all {{- range $name, $pages := $tags }} {{ $name }} ({{ len $pages }}) {{- end }}
{{- end }} {{- if .Pages }} {{/* Group posts by year */}} {{- range (.Pages.GroupByDate "2006") }}
YEAR://{{ .Key }} ({{ len .Pages }} entries)
    {{- range .Pages }}
  • $ cat {{ .Date.Format "Jan 02" }}

    {{ .Title }}

    {{- with .Params.subtitle }}

    {{ . }}

    {{- end }} {{- with .Summary }}

    {{ . }}

    {{- end }} {{- with .Params.tags }}
    {{- range . }} {{ . }} {{- end }}
    {{- end }}
  • {{- end }}
{{- end }} {{- else }}

// QUERY RETURNED 0 RESULTS

The archive is silent. Return when manuscripts have been added.

{{- end }} {{- template "partials/pagination.html" . }}
{{ partial "sidebar.html" . }}
{{ end }} {{- define "partials/pagination.html" }} {{- $pager := .Paginate .Pages }} {{- if gt $pager.TotalPages 1 }} {{- end }} {{- end }}