45 lines
1.7 KiB
HTML
45 lines
1.7 KiB
HTML
<meta name="twitter:card" content="summary_large_image"/>
|
|
<meta name="twitter:site" content="@{{ .Site.Params.twitterUser }}"/>
|
|
<meta name="twitter:creator" content="@{{ .Site.Params.twitterUser }}"/>
|
|
|
|
{{/*if .Params.images }}
|
|
{{ $baseUrl := .Permalink }}
|
|
{{ range first 1 .Params.images }}
|
|
<meta name="twitter:image" content="{{ $baseUrl }}{{ . }}"/>
|
|
{{ end }}
|
|
{{ else }}
|
|
<meta name="twitter:image" content="{{ .Site.BaseURL }}images/{{ .Site.Params.avatar }}"/>
|
|
{{ end */}}
|
|
<meta name="twitter:title" content="{{ .Title }}"/>
|
|
{{ if .Description }}
|
|
<meta name="twitter:description" content="{{ .Description }}"/>
|
|
{{ else }}
|
|
<meta name="twitter:description" content="{{ .Site.Params.description }}"/>
|
|
{{ end }}
|
|
|
|
<meta property="og:title" content="{{ .Title }}" />
|
|
{{ if .Description }}
|
|
<meta property="og:description" content="{{ .Description }}"/>
|
|
{{ else }}
|
|
<meta property="og:description" content="{{ .Site.Params.description }}"/>
|
|
{{ end }}
|
|
{{ if eq .Kind "page" }}
|
|
<meta property="og:type" content="article" />
|
|
{{ else }}
|
|
<meta property="og:type" content="website" />
|
|
{{ end }}
|
|
<meta property="og:url" content="{{ .Permalink }}" />
|
|
{{ $title := .Title }}
|
|
{{if .Params.images }}
|
|
{{ $baseUrl := .Permalink }}
|
|
{{ $altText := i18n "alt_image" }}
|
|
{{ range first 1 .Params.images }}
|
|
<meta property="og:image" content="{{ $baseUrl }}{{ . }}"/>
|
|
<meta property="og:image:alt" content="{{ $altText }} {{ $title }}"/>
|
|
{{ end }}
|
|
{{ else }}
|
|
<meta property="og:image" content="{{ .Site.BaseURL }}images/avatar.png"/>
|
|
<meta property="og:image:alt" content="{{ i18n "alt_avatar" . }}"/>
|
|
{{ end }}
|
|
<meta property="og:updated_time" content="{{ .Site.LastChange }}" />
|
|
<meta property="og:site_name" content="{{ .Site.Title }}" />
|