{{- /* Renders the project entries on the landing page from data/projects.yaml. Validates the data so a broken entry fails the build instead of shipping an empty card. Images live in assets/ and are resized by Hugo. Styling lives in layouts/_partials/extend_head.html. */ -}} {{- with hugo.Data.projects -}}

Projekte

{{- range $project := . }} {{- if or (not $project.name) (not $project.url) (not $project.description) (not $project.image) }} {{- errorf "data/projects.yaml: entry %q needs name, url, description and image" (default "" $project.name) }} {{- end }} {{- if not (hasPrefix $project.url "http") }} {{- errorf "data/projects.yaml: %q must use an absolute http(s) url, got %q" $project.name $project.url }} {{- end }} {{- $image := resources.Get $project.image }} {{- if $image }} {{- $image = $image.Resize "800x webp" }} {{- else }} {{- errorf "data/projects.yaml: image %q for %q does not exist under assets/" $project.image $project.name }} {{- end }}
{{- with $image }} {{- end }} {{- with $project.image_credit }}
{{ . }}
{{- end }}

{{ $project.name }}

{{- with $project.status }} {{ . }} {{- end }}
{{- $.Page.RenderString (dict "display" "block") $project.description -}}
{{- with $project.tags }}
    {{- range . }}
  • {{ . }}
  • {{- end }}
{{- end }}
{{- end }}
{{- else -}} {{- errorf "data/projects.yaml is missing or empty" -}} {{- end -}}