♻️ Reorganize projects data to TOML format

This commit is contained in:
Dan Jones 2025-11-22 11:12:58 -06:00
commit 368cd3619b
6 changed files with 70 additions and 51 deletions

View file

@ -58,7 +58,7 @@
<aside id="{{ .Params.id }}" class="{{ .Params.class }}">
{{ .Content }}
{{- if eq .Params.id "projects" }}
{{ $dataPath := "data/projects.yaml" }}
{{ $dataPath := "data/projects.toml" }}
{{ with $.Resources.Get $dataPath }}
{{ partial "projects.html" . }}
{{ else }}

View file

@ -43,7 +43,7 @@
{{ .Content }}
</div>
{{ with .Resources.Get "data/projects.yaml" }}
{{ with .Resources.Get "data/projects.toml" }}
<aside id="projects">
{{ partial "projects.resume.html" . }}
</aside>

View file

@ -2,15 +2,15 @@
{{ with . | transform.Unmarshal -}}
{{- range $project := . -}}
{{- range $slug, $proj := $project -}}
<section class="project {{ $slug }}">
{{- range $proj := $project -}}
<section class="project {{ $proj.slug }}">
<h3>{{ $proj.name }}</h3>
<p><a href="{{ $proj.url }}" class="noprint">🔗</a>
{{ $proj.desc }}</p>
</section><!-- /.project.{{ $slug }} -->
</section><!-- /.project.{{ $proj.slug }} -->
{{- end -}}
{{- end -}}
{{- end }}

View file

@ -2,8 +2,8 @@
<h2>Selected Open Source Projects</h2>
<ul>
{{- range $project := . -}}
{{- range $slug, $proj := $project }}
<li class="project {{ $slug }}"><a href="{{ $proj.url }}">{{ $proj.name }}</a> {{ $proj.desc }}</li>
{{- range $proj := $project }}
<li class="project {{ $proj.slug }}"><a href="{{ $proj.url }}">{{ $proj.name }}</a> {{ $proj.desc }}</li>
{{- end -}}
{{- end }}
</ul>