From e378cbd5d01f226c73aa5b5d033662ea86c01888 Mon Sep 17 00:00:00 2001 From: wowqing Date: Wed, 6 Nov 2024 18:52:23 +0800 Subject: [PATCH] Add alt to logo image for better SEO (#1380) --- layouts/partials/header.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layouts/partials/header.html b/layouts/partials/header.html index c227be9be..4c8c06bf4 100644 --- a/layouts/partials/header.html +++ b/layouts/partials/header.html @@ -4,8 +4,9 @@
{{- with .Site.Params.header.title -}} + {{- $alt := .name | default $.Site.Title -}} {{- with .logo -}} - {{- dict "Src" . "Class" "tw-inline tw-align-text-bottom tw-mr-1" "Height" "32" "Width" "32" | partial "plugin/image.html" -}} {{- end -}} + {{- dict "Src" . "Class" "tw-inline tw-align-text-bottom tw-mr-1" "Height" "32" "Width" "32" "Alt" $alt | partial "plugin/image.html" -}} {{- end -}} {{- with .pre -}} {{ . | safeHTML }} {{- end -}} @@ -107,8 +108,9 @@