drm-pt.info/layouts/_default/single.html

40 lines
1.6 KiB
HTML
Raw Normal View History

2023-07-19 11:33:45 +00:00
{{ 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" />
2023-07-18 22:26:43 +00:00
{{ end }}
{{ define "main" }}
<article>
<h1>{{ .Title }}</h1>
2023-07-19 11:33:45 +00:00
{{ if (eq .Section "artigos") }}
{{ partial "byline.html" . }}
{{ end }}
2023-07-18 22:26:43 +00:00
{{ $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 }}
2023-07-18 22:26:43 +00:00
{{ .Content }}
</article>
2023-07-18 22:26:43 +00:00
{{ end }}