layouts: use author partial in head and post_meta

This commit is contained in:
Aditya Telange 2020-10-25 12:47:09 +05:30
parent bc2b82c370
commit 5b9eaac130
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
<meta name="author" content="{{ .Params.author | default .Site.Params.author }}">
<meta name="author" content="{{ (partial "author.html" . ) }}">
<link rel="canonical" href="{{ .Permalink }}" />
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />

View File

@ -8,9 +8,9 @@
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
{{- end -}}
{{- if or .Params.author .Site.Params.author }}
{{- $scratch.Add "meta" (slice (.Params.author | default .Site.Params.author)) }}
{{- end -}}
{{ with (partial "author.html" . ) }}
{{ $scratch.Add "meta" (slice .)}}
{{end}}
{{- with ($scratch.Get "meta")}}
{{- delimit . "&nbsp;·&nbsp;"}}