mirror of
https://github.com/yuzu-emu/shared-bulma-theme.git
synced 2024-11-27 19:14:21 +01:00
layouts: use Hugo to process game icons and banners
This commit is contained in:
parent
a94bfba031
commit
c497835859
@ -3,8 +3,8 @@
|
|||||||
<meta property="og:description" content="{{ $rating.name }} - {{ $rating.description }}" />
|
<meta property="og:description" content="{{ $rating.name }} - {{ $rating.description }}" />
|
||||||
<meta name="description" content="{{ $rating.name }} - {{ $rating.description }}" />
|
<meta name="description" content="{{ $rating.name }} - {{ $rating.description }}" />
|
||||||
|
|
||||||
<meta property="og:type" content="article" />
|
<meta property="og:type" content="article" />{{- $fn := printf "/images/game/icons/%s.png" .File.BaseFileName -}}{{- $icon := resources.Get $fn -}}
|
||||||
<meta property="og:image" content="{{ .Site.BaseURL }}/images/game/icons/{{ .File.BaseFileName }}.png" />
|
{{ 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 }}" />
|
<meta property="og:article:published_time" content="{{ .Date.Format "2006-01-02T15:04:05Z07:00" | safeHTML }}" />
|
||||||
{{ range .Params.tags }}
|
{{ range .Params.tags }}
|
||||||
<meta property="og:article:tag" content="{{ . }}" />
|
<meta property="og:article:tag" content="{{ . }}" />
|
||||||
|
@ -6,13 +6,13 @@
|
|||||||
|
|
||||||
<loc>{{ .Permalink }}</loc>
|
<loc>{{ .Permalink }}</loc>
|
||||||
|
|
||||||
{{ if (eq .Section "entry") }}
|
{{ if (eq .Section "entry") }}{{- $banner_fn := .Params.Banner | default (print .File.BaseFileName ".png") -}}
|
||||||
<image:image>
|
<image:image>{{- $fn := printf "/images/banners/%s" $banner_fn -}}{{- $banner := resources.Get $fn -}}
|
||||||
<image:loc>{{ .Site.BaseURL }}/images/banners/{{ .Params.Banner | default (print .File.BaseFileName ".png") }}</image:loc>
|
{{ with $banner }}<image:loc>{{- $thumb := .Fit "824x306 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}{{ $thumb.Permalink }}</image:loc>{{ end }}
|
||||||
</image:image>
|
</image:image>
|
||||||
{{ else if (eq .Section "game") }}
|
{{ else if (eq .Section "game") }}
|
||||||
<image:image>
|
<image:image>{{- $fn := printf "/images/game/icons/%s.png" .File.BaseFileName -}}{{- $icon := resources.Get $fn -}}
|
||||||
<image:loc>{{ .Site.BaseURL }}/images/game/icons/{{ .File.BaseFileName }}.png</image:loc>
|
{{ with $icon }}<image:loc>{{- $thumb := .Fill "48x48 jpg" | resources.Copy (printf "%s.jpg" $fn) -}}{{ $thumb.Permalink }}</image:loc>{{ end }}
|
||||||
</image:image>
|
</image:image>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user