♻️ Refactor projects section to use data file

This commit is contained in:
Dan Jones 2025-11-21 20:20:47 -06:00
commit 6c56f6dc5f
4 changed files with 70 additions and 81 deletions

View file

@ -57,6 +57,14 @@
{{ range .Resources.Match "sections/*.md" }}
<aside id="{{ .Params.id }}" class="{{ .Params.class }}">
{{ .Content }}
{{- if eq .Params.id "projects" }}
{{ $dataPath := "data/projects.yaml" }}
{{ with $.Resources.Get $dataPath }}
{{ partial "projects.html" . }}
{{ else }}
{{ errorf "Unable to get %s" $dataPath }}
{{ end }}
{{ end }}
</aside>
{{ end }}