1
Fork 0
theorangeone.net-legacy/layouts/partials/metadata.html
2017-05-07 21:32:34 +01:00

33 lines
2 KiB
HTML

<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ .Site.Data.social.accounts.twitter.username }}" />
<meta name="twitter:title" content="{{ .Title | htmlUnescape }}" />
<meta name="twitter:description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta name="twitter:creator" content="{{ .Site.Data.social.accounts.twitter.username }}" />
{{ if .Params.image }}
<meta name="twitter:image" content="{{ absURL .Params.image }}" />
<meta name="twitter:image:alt" content="{{ .Title | htmlUnescape }}" />
{{ end }}
<meta property="og:title" content="{{ .Title | htmlUnescape }}" />
<meta property="og:type" content="{{ .Kind }}" />
<meta property="og:url" content="{{ .Permalink }}" />
{{ if .Params.image }}
<meta property="og:image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta property="og:description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta property="og:site_name" content="{{ title .Site.Title | htmlUnescape }}" />
<meta property="og:locale" content="{{ .Site.Language.Lang }}" />
<meta itemprop="name" content="{{ .Title | htmlUnescape }}" />
<meta itemprop="description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
{{ if .Params.image }}
<meta itemprop="image" content="{{ absURL .Params.image }}" />
{{ end }}
<meta name="article:author" content="{{ title .Site.Params.author }}" />
<meta name="article:modified_time" content="{{ .Lastmod }}" />
<meta name="article:published_time" content="{{ .Date }}" />
<meta name="article:section" content="{{ .Type }}" />
<meta name="description" content="{{ .Summary | plainify | chomp | htmlUnescape | truncate .Site.Params.summary_length_long "..." }}" />
<meta name="author" content="{{ title .Site.Params.author }}" />
<meta name="canonical" content="{{ .Permalink }}" />