shared-bulma-theme/layouts/game/meta.html

12 lines
795 B
HTML

{{ if .IsPage }}
{{ $rating := index .Site.Data.compatibility .Params.compatibility }}
<meta property="og:description" content="{{ $rating.name }} - {{ $rating.description }}" />
<meta name="description" content="{{ $rating.name }} - {{ $rating.description }}" />
<meta property="og:type" content="article" />{{- $fn := printf "/images/game/icons/%s.png" .File.BaseFileName -}}{{- $icon := resources.Get $fn -}}
{{ with $icon }}{{- $thumb := .Fill "48x48 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}<meta property="og:image" content="{{ $thumb.Permalink }}" />{{ end }}
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
{{ range .Params.tags }}
<meta property="og:article:tag" content="{{ . }}" />
{{ end }}
{{ end }}