{{ define "text" }}

{{- markdownify . -}}

{{ end }} {{ define "hash" }} {{ $length := sub (len .) 5 }} {{ substr . 0 10 }}...{{ substr . $length 5 }} {{ end }}
{{ range (sort .Params.content "index") -}}
{{ humanize .category }}
{{- if isset . "date" -}} {{ template "text" dateFormat "January 2, 2006" .date }} {{- end -}} {{- if isset . "description" -}} {{ template "text" .description }} {{- end -}} {{- if isset . "size" -}} {{ template "text" (print "Size: " .size) }} {{- end -}} {{- if isset . "hash" -}}
{{ template "hash" .hash }}
{{- end -}} {{- if isset . "picture" -}} {{ end }}
{{- if isset . "website" -}} {{ partial "icons/globe.svg" }} {{- end -}} {{- if isset . "snapshot" -}} {{ partial "icons/history.svg" }} {{- end -}} {{- if isset . "source" -}} {{ partial "icons/code.svg" }} {{- end -}} {{- if isset . "demo" -}} {{ partial "icons/flask.svg" }} {{- end -}}
{{ end }}
{{ .Content }}