+ {{- $coverPath := $bundle.Params.cover -}} + {{- $mtop := "2rem" -}} + {{- $img := false -}} + {{- $coverData := dict -}} + + {{- if $coverPath -}} + {{- $img = $bundle.Resources.GetMatch $coverPath -}} + {{- if $img }} + {{- $mtop = "100vh" -}} + + {{/* Traitement YAML compagnon de l’image */}} + {{- $basename := path.Base $coverPath -}} + {{- $filename := replaceRE "\\.[^.]+$" "" $basename -}} + {{- $yamlPath := printf "data/images/%s.yaml" $filename -}} + {{- $yamlFile := $bundle.Resources.GetMatch $yamlPath -}} + + {{- with $yamlFile }} + {{- $coverData = .Content | transform.Unmarshal -}} + {{- end }} + + + {{- if $coverData.attribution }} + + Attribution : + {{ $coverData.attribution | markdownify }} + + {{- end }} + + + {{- end }} + {{- end }} + + {{- if $bundle.Content }} + + {{ $bundle.Content }} + + {{- end }} +