Explorar o código

fix: SVG header logo missing size (Lighthouse fix)

See unresolved Hugo issue: https://github.com/gohugoio/hugo/issues/3700

Workaround is to manually define SVG size:
site.Params.header.image.width
site.Params.header.image.height
George Cushen %!s(int64=3) %!d(string=hai) anos
pai
achega
f6356f5ceb
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      wowchemy/layouts/partials/navbar.html

+ 3 - 1
wowchemy/layouts/partials/navbar.html

@@ -20,7 +20,9 @@
     <div class="d-none d-lg-inline-flex">
       <a class="navbar-brand" href="{{ "/" | relLangURL }}">
         {{- if $has_logo -}}
-          <img src="{{ $logo.RelPermalink }}" alt="{{ site.Title }}">
+          <img src="{{ $logo.RelPermalink }}" alt="{{ site.Title }}"
+          {{with site.Params.header.image.width}}width="{{.}}"{{end}}
+          {{with site.Params.header.image.height}}height="{{.}}"{{end}}>
         {{- else -}}
           {{- site.Title -}}
         {{- end -}}