{{ $heading_level := .heading_level | default 3 }} {{ $heading := printf "h%d" $heading_level }}
{{ range $project := .projects -}} {{ with site.GetPage .file }} {{ $heading_tag := (dict "open" ((printf "<%s class='project-title' itemprop='name'>" $heading) | safeHTML) "close" ((printf "" $heading) | safeHTML) ) }}
{{- $title := partial "PrepareHTML" .Title -}} {{ $heading_tag.open }} {{ $heading_tag.close }} {{ if and site.Params.projects.index.show_description (partial "GetTextFromHTML" .Params.summary) }}

{{ partial "GetTruncateContent" ( dict "text" .Params.summary "length" site.Params.projects.index.truncate_description ) }}

{{ end }}
{{ if and site.Params.projects.index.show_year .Params.year }} {{ end }} {{ if site.Params.projects.index.show_categories }} {{- partial "projects/categories" . -}} {{ end }}
{{- if .Params.image -}} {{- partial "commons/image.html" (dict "image" .Params.image "sizes" site.Params.image_sizes.sections.projects.item ) -}} {{- else -}} {{- partial "commons/image-default.html" "projects" -}} {{- end -}}
{{ end }} {{ end }}