Kaynağa Gözat

Add meta description to header

Based on hugo docs: https://gohugo.io/variables/site/#example-site-params
And developers.google recommendations: https://developers.google.com/web/tools/lighthouse/audits/description?utm_source=lighthouse&utm_medium=devtools
Artur Zylinski 5 yıl önce
ebeveyn
işleme
b6a5534d1b
1 değiştirilmiş dosya ile 1 ekleme ve 0 silme
  1. 1
    0
      layouts/partials/head.html

+ 1
- 0
layouts/partials/head.html Dosyayı Görüntüle

@@ -13,6 +13,7 @@
13 13
   {{- else -}}
14 14
   <title>{{ .Title }} &middot; {{ .Site.Title }}</title>
15 15
   {{- end }}
16
+  <meta name="description" content="{{if .IsHome}}{{ $.Site.Params.description }}{{else}}{{.Description}}{{end}}" />
16 17
 
17 18
   <!-- CSS -->
18 19
   <link type="text/css" rel="stylesheet" href="{{ .Site.BaseURL }}css/print.css" media="print">