{{- $releases_url := (.Get 0) -}} {{- $gh_project_repo := ($.Site.Param "github_project_repo") -}} {{- $dataJSON := false }} {{- with $github_token := (os.Getenv "HUGO_GITHUB_TOKEN" | default false ) -}} {{- $bearer_token := dict "Authorization" (printf "Bearer %s" .) -}} {{- $dataJSON = getJSON $releases_url $bearer_token -}} {{- else }} {{- $dataJSON = getJSON $releases_url -}} {{- end }} {{ with $dataJSON }}
{{- $separator := false -}} {{- range $release := $dataJSON }} {{- with $separator }} {{/* No separator before the first entry */}} {{ . | markdownify }} {{- end }}

{{- with .tag_name -}} {{- $link := printf "%s/tree/%s" $gh_project_repo . -}} Version {{ . }} {{- end -}}

Download

{{ .body | markdownify }}
{{- $separator = "
" -}} {{- end -}}
{{ else }} {{ $.Page.Scratch.Set "github_error" true }} {{ end }}