diff options
| author | Serghei Iakovlev <egrep@protonmail.ch> | 2022-04-23 23:36:06 +0200 |
|---|---|---|
| committer | Serghei Iakovlev <egrep@protonmail.ch> | 2022-04-23 23:36:06 +0200 |
| commit | ebc0aa6ab1898f0e3fa86337ce9c92fed78e0021 (patch) | |
| tree | e137bf54937192786caa23d8bf7537e2ee568b91 /layouts | |
| parent | bd5d696c123625118c3a4497c207a3c11e15e882 (diff) | |
| download | gohugo-theme-ed-ebc0aa6ab1898f0e3fa86337ce9c92fed78e0021.tar.gz | |
Add site description
Diffstat (limited to 'layouts')
| -rw-r--r-- | layouts/partials/head.html | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/layouts/partials/head.html b/layouts/partials/head.html index aa500a1..d4b2a82 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -4,8 +4,10 @@ {{- $title := print .Title -}} {{ if .IsHome }}{{ $title = .Site.Title }}{{ end }} - {{- $description := print .Description -}} - {{ if .IsHome }}{{ $description = .Site.Params.Description }}{{ end }} + {{- $description := print .Params.Description -}} + {{- if or .IsHome (eq .Params.Description "") (not .Params.Description) -}} + {{ $description = .Site.Params.Description }} + {{- end -}} {{- $author := print .Site.Author.name -}} {{- if .Params.author -}}{{ $author = .Params.author }}{{- end -}} @@ -36,7 +38,12 @@ <meta property="og:image" content="{{ $resource_url }}{{ "img/open-graph-logo.png" }}"> <meta property="og:image:width" content="200"> <meta property="og:image:height" content="200"> - {{- /* TODO: add fb:admins and fb:app_id */}} + {{- /* TODO: add fb:admins and fb:app_id */ -}} <!-- meta property="fb:admins" content="" --> <!-- meta property="fb:app_id" content="" --> + + {{- /* TODO: add ability to render 'article' type */ -}} + <meta name="description" content="{{ $description }}"> + <meta property="og:description" content="{{ .Site.Params.Description }}"> + <meta property="og:type" content="website"> </head> |
