40 lines
1.6 KiB
HTML
40 lines
1.6 KiB
HTML
{{ define "title" }}{{ .Title }} | {{ .Site.Title }}{{ end }}
|
|
{{ define "opengraph" }}
|
|
{{ $cover := (index (.Resources.ByType "image") 0) }}
|
|
<meta property="og:type" content="article" />
|
|
<meta property="og:description" content="{{ .Summary }}" />
|
|
<meta property="og:article:published_time" content="article" />
|
|
<meta name="author" content="{{ .Params.author }}" />
|
|
<meta property="og:article:author" content="{{ .Params.author }}" />
|
|
<meta property="og:article:category" content="{{ (index .Params.categories 0) }}" />
|
|
<meta property="og:title" content="{{ .Title }}" />
|
|
<meta property="og:site_name" content="{{ .Site.Title }}" />
|
|
<meta property="og:image" content="{{ $cover.Permalink }}" />
|
|
<meta property="og:image:alt" content="{{ .Params.coverdescription }}" />
|
|
<meta property="og:image:width" content="{{ $cover.Width }}" />
|
|
<meta property="og:image:height" content="{{ $cover.Height }}" />
|
|
|
|
<meta name="twitter:description" content="{{ .Summary }}" />
|
|
<meta name="twitter:title" content="{{ .Title }}" />
|
|
<meta name="twitter:image" content="{{ $cover.Permalink }}" />
|
|
<meta name="twitter:card" content="summary_large_image" />
|
|
{{ end }}
|
|
{{ define "main" }}
|
|
<article>
|
|
<h1>{{ .Title }}</h1>
|
|
{{ if (eq .Section "artigos") }}
|
|
{{ partial "byline.html" . }}
|
|
{{ end }}
|
|
|
|
{{ $cover := (index (.Resources.ByType "image") 0) }}
|
|
{{ if $cover }}
|
|
<figure class='cover'>
|
|
<img src="{{ $cover.Permalink }}" alt="{{ .Params.coverdescription }}" title="{{ .Params.coverdescription }}" />
|
|
<figcaption>{{ .Params.covercaption }}</figcaption>
|
|
</figure>
|
|
{{ end }}
|
|
|
|
{{ .Content }}
|
|
</article>
|
|
{{ end }}
|