Skip to content

Commit

Permalink
Add alt to logo image for better SEO (#1380)
Browse files Browse the repository at this point in the history
  • Loading branch information
wu0407 authored Nov 6, 2024
1 parent 324b48d commit e378cbd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions layouts/partials/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
<div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- 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 -}}
<span class="tw-mr-1">{{ . | safeHTML }}</span>
{{- end -}}
Expand Down Expand Up @@ -107,8 +108,9 @@
<div class="header-title">
<a href="{{ .Site.Home.RelPermalink }}" title="{{ .Site.Title }}">
{{- 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" -}}
{{- 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 -}}
<span class="tw-mr-1">{{ . | safeHTML }}</span>
Expand Down

0 comments on commit e378cbd

Please sign in to comment.