{{- $pages := .Pages -}} {{- if gt (len $pages) 0 -}}

Chronologie

    {{- range $pages -}} {{- $page := . -}} {{- $coverPath := $page.Params.cover -}} {{- $image := false -}} {{- if $coverPath -}} {{- if strings.HasSuffix $coverPath ".yaml" -}} {{- $coverAbsPath := printf "%s%s" $page.File.Dir $coverPath -}} {{- $coverRaw := readFile $coverAbsPath -}} {{- $coverData := $coverRaw | transform.Unmarshal -}} {{- with $coverData.file -}} {{- $image = $page.Resources.GetMatch . -}} {{- end -}} {{- else -}} {{- $image = $page.Resources.GetMatch $coverPath -}} {{- end -}} {{- end -}} {{- $dossierTitle := "" -}} {{- $dossierFirstPage := false -}} {{- with $page.Params.dossier -}} {{- with index . 0 -}} {{- $dossierTitle = . -}} {{- $dossierFirstPage = partial "dossier-first-page.html" $page -}} {{- end -}} {{- end -}}
  1. {{- with $image -}}
    {{- $resized := .Fill "600x340 webp q80" -}} Image de couverture pour {{ $page.Title }}
    {{- end -}}

    {{- with $page.Date -}} {{- end -}}

    {{- with $dossierFirstPage -}} {{- with $dossierTitle -}}

    {{ $dossierTitle }}

    {{- end -}} {{- end -}}

    {{ $page.Title }}

    {{- with $page.Summary -}}

    {{ . | plainify | truncate 240 }}

    {{- end -}}
  2. {{- end -}}
{{- end -}}