♻️ Reorganize projects data to TOML format
This commit is contained in:
parent
db1b7ee5e6
commit
368cd3619b
6 changed files with 70 additions and 51 deletions
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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 }}
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue