Browse Source

Improve Web Vitals: SEO and Accessibility

pull/10/head
Nicolas Massé 5 years ago
parent
commit
19c89c67b0
  1. 2
      layouts/shortcodes/attachedFigure.html
  2. 4
      layouts/shortcodes/figure.html
  3. 2
      themes/itix

2
layouts/shortcodes/attachedFigure.html

@ -2,7 +2,7 @@
{{- $filename := .Get "src" -}}
{{- $image := .Page.Resources.GetMatch (printf "%s" $filename) -}}
<figure>
<img src="{{ $image.RelPermalink }}">
<img src="{{ $image.RelPermalink }}" alt="{{- .Get "title" | plainify -}}">
{{- with .Get "title" }}
<figcaption>
{{- . -}}

4
layouts/shortcodes/figure.html

@ -1,10 +1,10 @@
<!-- This shortcode renders an HTML figure based on a file dropped in the /public folder -->
{{ $url := .Get "src" }}
<figure>
<img src="{{ $url }}">
<img src="{{ $url }}" alt="{{- .Get "title" | plainify -}}">
{{ with .Get "title" }}
<figcaption>
{{ . }}
{{- . -}}
</figcaption>
{{ end }}
</figure>

2
themes/itix

@ -1 +1 @@
Subproject commit b44dbf83c122f737f2a21359c469af6e792388ee
Subproject commit 1fefdd07f96b3ab6580fbbb9eb7cea73352d2470
Loading…
Cancel
Save