Reorganize partials
Signed-off-by: Nikolaos Karaolidis <nick@karaolidis.com>
This commit is contained in:
22
layouts/partials/components/head/twitter.html
Normal file
22
layouts/partials/components/head/twitter.html
Normal file
@@ -0,0 +1,22 @@
|
||||
<meta name="twitter:title" content="{{- .Title -}}" />
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content="{{- with .Description -}}
|
||||
{{- . -}}
|
||||
{{- else -}}
|
||||
{{- if .IsPage -}}
|
||||
{{- .Summary -}}
|
||||
{{- else -}}
|
||||
{{- with .Site.Params.description -}}{{- . -}}{{- end -}}
|
||||
{{- end -}}
|
||||
{{- end -}}"
|
||||
/>
|
||||
|
||||
{{ with .Params.image }}
|
||||
{{ $image := $.Resources.GetMatch . }}
|
||||
{{ with $image }}
|
||||
{{ $thumb := .Resize "400x" }}
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta name="twitter:image" content="{{- $thumb.Permalink -}}" />
|
||||
{{ end }}
|
||||
{{ end }}
|
Reference in New Issue
Block a user