Fix alt text, img sizes, and description on new art page

This commit is contained in:
Joshua Goins 2022-12-20 19:31:15 -05:00
parent 8058df4bc6
commit 4013cdcb1f
3 changed files with 5 additions and 1 deletions

View file

@ -1,6 +1,7 @@
--- ---
title: Art title: Art
layout: art layout: art
summary: My personal art gallery.
aliases: aliases:
- /gallery - /gallery
featured: featured:

View file

@ -115,6 +115,8 @@ with open('../data/art.json', 'r') as f:
write_field(f, 'title', 'Art') write_field(f, 'title', 'Art')
write_field(f, 'layout', 'art') write_field(f, 'layout', 'art')
write_field(f, 'summary', 'My personal art gallery.')
f.write('aliases:\n') f.write('aliases:\n')
f.write('- /gallery\n') f.write('- /gallery\n')

View file

@ -51,10 +51,11 @@
<h3>Years</h3> <h3>Years</h3>
{{ range $.Param "years" }} {{ range $.Param "years" }}
{{ $year := . }}
<a href="/art/{{ . }}"> <a href="/art/{{ . }}">
{{ $thumbp := printf "/year-thumbs/%s.webp" . }} {{ $thumbp := printf "/year-thumbs/%s.webp" . }}
{{ with resources.Get $thumbp }} {{ with resources.Get $thumbp }}
<img class="gallery-img article-img" src="{{ .RelPermalink }}"> <img width="512" height="256" alt="{{ $year }}" class="gallery-img article-img" src="{{ .RelPermalink }}">
{{ end }} {{ end }}
</a> </a>
{{ end }} {{ end }}