1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-10 00:12:09 +00:00

make alt attr use double quotes

This commit is contained in:
Seirdy 2024-07-14 01:49:20 -04:00
parent 5a4da5f818
commit 566539df67
No known key found for this signature in database
GPG key ID: 1E892DB2A5F84479

View file

@ -12,7 +12,7 @@
{{ $dark_webp := resources.GetMatch (printf "/p/%s_dark.webp" (.Get "name")) -}} {{ $dark_webp := resources.GetMatch (printf "/p/%s_dark.webp" (.Get "name")) -}}
{{ $dark_avif := resources.GetMatch (printf "/p/%s_dark.avif" (.Get "name")) -}} {{ $dark_avif := resources.GetMatch (printf "/p/%s_dark.avif" (.Get "name")) -}}
{{ $dark_jxl := resources.GetMatch (printf "/p/%s_dark.jxl" (.Get "name")) -}} {{ $dark_jxl := resources.GetMatch (printf "/p/%s_dark.jxl" (.Get "name")) -}}
{{ $alt := .Get "alt" -}}
{{- $orig_img := $light_png -}} {{- $orig_img := $light_png -}}
{{- $orig_img_type := "image/png" -}} {{- $orig_img_type := "image/png" -}}
{{- $orig_img_dark := $dark_png -}} {{- $orig_img_dark := $dark_png -}}
@ -119,7 +119,7 @@
type="{{ $orig_img_type }}" /> type="{{ $orig_img_type }}" />
<img{{ with .Get "class" }} class="{{ . }}"{{ end }} <img{{ with .Get "class" }} class="{{ . }}"{{ end }}
width="{{ $img_width }}" height="{{ $img_height }}" width="{{ $img_width }}" height="{{ $img_height }}"
src="{{ $orig_src.Permalink }}" alt='{{ .Get "alt" }}' src="{{ $orig_src.Permalink }}" alt="{{ $alt }}"
{{ with .Parent -}} {{ with .Parent -}}
{{ if eq .Name "transcribed-image-figure" -}} {{ if eq .Name "transcribed-image-figure" -}}
{{ with .Get "id" -}} {{ with .Get "id" -}}