hugo-geekblog/layouts/partials/head/meta.html

27 lines
821 B
HTML
Raw Normal View History

<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
2020-07-25 13:53:27 +02:00
2020-07-24 22:25:04 +02:00
{{ $description := default (default .Site.Title .Site.Params.description) (default .Summary .Description) }}
{{ $keywords := default .Site.Params.Keywords .Keywords }}
{{ $authors := default (slice .Site.Params.GeekblogAuthor) .Params.authors }}
2020-07-25 13:53:27 +02:00
2020-07-22 10:51:13 +02:00
{{ with $description }}
<meta name="description" content="{{ . }}" />
2020-07-22 10:51:13 +02:00
{{ end }}
{{ with $keywords }}
<meta name="keywords" content="{{ delimit . "," }}" />
2020-07-22 10:51:13 +02:00
{{ end }}
{{ with $authors }}
{{ $list := slice }}
{{ range sort . }}
{{ with . }}
{{ $author := index $.Site.Data.authors . }}
{{ $list = $list | append $author.name }}
2020-07-22 10:51:13 +02:00
{{ end }}
{{ end }}
2020-07-06 20:55:32 +02:00
{{ with $list }}
<meta name="author" content="{{ delimit . "," }}" />
{{ end }}
2020-07-22 10:51:13 +02:00
{{ end }}