layouts: use author partial in head and post_meta
This commit is contained in:
parent
bc2b82c370
commit
5b9eaac130
|
@ -10,7 +10,7 @@
|
||||||
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
|
<meta name="description" content="{{- with .Description }}{{ . }}{{- else }}{{- if .IsPage}}
|
||||||
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
{{- .Summary | default (printf "%s - %s" .Title .Site.Title) }}{{- else }}
|
||||||
{{- with .Site.Params.description }}{{ . }}{{- end }}{{- end }}{{- end -}}">
|
{{- 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 }}" />
|
<link rel="canonical" href="{{ .Permalink }}" />
|
||||||
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
{{- if .Site.Params.analytics.google.SiteVerificationTag }}
|
||||||
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
<meta name="google-site-verification" content="{{ .Site.Params.analytics.google.SiteVerificationTag }}" />
|
||||||
|
|
|
@ -8,9 +8,9 @@
|
||||||
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
|
{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%s min" .ReadingTime))) }}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
{{- if or .Params.author .Site.Params.author }}
|
{{ with (partial "author.html" . ) }}
|
||||||
{{- $scratch.Add "meta" (slice (.Params.author | default .Site.Params.author)) }}
|
{{ $scratch.Add "meta" (slice .)}}
|
||||||
{{- end -}}
|
{{end}}
|
||||||
|
|
||||||
{{- with ($scratch.Get "meta")}}
|
{{- with ($scratch.Get "meta")}}
|
||||||
{{- delimit . " · "}}
|
{{- delimit . " · "}}
|
||||||
|
|
Loading…
Reference in New Issue