{{- $allowedRssSections := (slice "articles" "games") -}}
{{- $baseurl := .Site.BaseURL -}}
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = .Site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := .Site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- printf "" | safeHTML }}
{{- printf "" | safeHTML }}
By {{ .Site.Author.name }} on .
{{ if .Params.game_name }}
{{ $platform := .CurrentSection.Title }}
{{ with .CurrentSection.Params.platform }}
Played on: {{ $platform }}
{{ end }}
{{ with .Params.game_genre }}
{{ $tag := replaceRE `\s` "-" . }}
Genre: {{ . }}
{{ end }}
{{ with .Params.game_release_year }}
Release year: {{ . }}
{{ end }}
{{ with .Params.game_developer }}
Developer: {{ . }}
{{ end }}
{{ with .Params.howlongtobeat_hrs }}
How long to beat: {{ . }}
hr{{ if gt . 1}}s{{ end }}
{{ end }}
{{ $thumb := "" }}
{{ if .Params.image }}
{{ $thumb = .Params.image }}
{{ else }}
{{ if .Params.howlongtobeat_id }}
{{ $thumb = (printf "%scover.jpg" .Page.Permalink) }}
{{ end }}
{{ end }}
{{ if ne $thumb "" }}
{{ end }}