{{- with .GitInfo -}} {{- $history := slice . -}} {{- range .Ancestors -}} {{- $history = $history | append . -}} {{- end -}} {{- $repositoryURL := "" -}} {{- $diffAnchor := "" -}} {{- with $.Site.Params.repositoryURL -}} {{- $repositoryURL = strings.TrimSuffix "/" (strings.TrimSpace .) -}} {{- end -}} {{- with $.File.Path -}} {{- $diffAnchor = printf "#diff-%s" (sha1 (printf "content/%s" .)) -}} {{- end -}} {{- if gt (len $history) 0 -}}

Historique des modifications

    {{- range $history -}} {{- $commitURL := "" -}} {{- if ne $repositoryURL "" -}} {{- $commitURL = printf "%s/commit/%s%s" $repositoryURL .Hash $diffAnchor -}} {{- end -}}
  1. {{- if ne $commitURL "" -}} {{ .Subject }} {{- else -}}
    {{ .Subject }}
    {{- end -}}
  2. {{- end -}}
{{- end -}} {{- end -}}