1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-17 11:35:32 -04:00

remove redundant title tag on <img>s

This commit is contained in:
2020-11-30 15:22:59 -05:00
parent 9f32e8ba3f
commit ceee1f10ad
8 changed files with 43 additions and 39 deletions

View File

@@ -4,9 +4,9 @@
{{ with .Get "link" }}<a class="no-underline" href="{{ . }}"{{ if strings.HasPrefix . "http" }} target="_blank" rel="noopener"{{ end }}>{{ end }}
<img src="{{ $optimized.Permalink }}" width="{{ $optimized.Width }}" height="{{ $optimized.Height }}"
{{- with .Inner }}
alt="{{ . | $.Page.RenderString | plainify | safeHTML }}" title="{{ . | $.Page.RenderString | plainify | safeHTML }}"
alt="{{ . | $.Page.RenderString | plainify | safeHTML }}"
{{- else }}
{{ with .Get "alt" }} alt="{{ . | safeHTML }}" title="{{ . | safeHTML }}"{{ end }}
{{ with .Get "alt" }} alt="{{ . | safeHTML }}"{{ end }}
{{- end -}}
>
{{ if .Get "link" }}</a>{{ end }}