Fix those stupid little errors

This commit is contained in:
Joshua Goins 2022-12-20 14:16:26 -05:00
parent 20ee4a1e5b
commit 7a8171a1cf
3 changed files with 9 additions and 5 deletions

View file

@ -2,8 +2,10 @@
{{- $img := .Page.Resources.GetMatch .Destination -}}
{{- if and (not $img) .Page.File -}}
{{ $path := path.Join .Page.File.Dir .Destination }}
{{ with .Page.File }}
{{ $path := path.Join .Dir .Destination }}
{{- $img = resources.Get $path -}}
{{ end }}
{{- end -}}
{{- if and (not $img) .Page.File -}}

View file

@ -5,7 +5,7 @@
<table class="w-full table-auto mt-4">
<tr>
{{ if in .File.Dir "software" }}
{{ if and (.File) (in .File.Dir "software") }}
<th>Name</th>
<th>Description</th>
<th>Year Created</th>
@ -24,7 +24,7 @@
</td>
<td class="border-t">
{{ if in .File.Dir "software" }}
{{ if and (.File) (in .File.Dir "software") }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format " 2006"}}</time>
{{ else }}
<time datetime='{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}'>{{ .Date.Format "Jan 2, 2006"}}</time>

View file

@ -23,7 +23,9 @@
<a href="/imprint">Imprint</a>
<a href="https://git.sr.ht/~redstrate/redstrate.com/tree/master/item/content/{{ .File.Path }}?view-source">Source</a>
{{ with .File }}
<a href="https://git.sr.ht/~redstrate/redstrate.com/tree/master/item/content/{{ .Path }}?view-source">Source</a>
{{ end }}
</div>
<hr>