{{- $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 }} {{ if eq .Title .Site.Title }}{{ .Site.Title }}{{ else }}{{ with .Title }}{{.}} on {{ end }}{{ .Site.Title }}{{ end }} {{ .Permalink }} Recent content {{ if ne .Title .Site.Title }}{{ with .Title }}in {{.}} {{ end }}{{ end }}on {{ .Site.Title }} © {{ $.Site.Author.name }} (CC BY 4.0). Hugo -- gohugo.io{{ with .Site.LanguageCode }} {{.}}{{end}}{{ with .Site.Author.email }} {{.}}{{ with $.Site.Author.name }} ({{.}}){{end}}{{end}} {{ if not .Date.IsZero }}{{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} {{ with .OutputFormats.Get "RSS" }} {{ printf "" .Permalink .MediaType | safeHTML }} {{ end }} {{ range $pages }} {{ if and (in $allowedRssSections .Section) (gt (len .Content) 1) (ne .Params.ignore true) }} {{ .Title }} {{ .Permalink }} {{ .Site.Author.mastodonlink }} {{ .Date.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} {{ with $.Site.Author.name }}{{.}}{{end}} {{ .Permalink }} {{ if .Keywords }} {{ range .Keywords }} {{ . }} {{ end }} {{ else if .Params.tags }} {{ range .Params.tags }} {{ . }} {{ end }} {{ end }} {{ $lazyLoadImg := "data-src=" }} {{ $eagerLoadImg := "src=" }} {{ $contentImg := .Content | replaceRE $lazyLoadImg $eagerLoadImg | safeHTML }} {{ $content := .Content }} {{ $content = replaceRE `a href="(#.*?)"` (printf "%s%s%s" "a href=\"" .Permalink "$1\"") $content }} {{ $content = replaceRE `a href="/(.*?)"` (printf "%s%s%s" "a href=\"" $baseurl "$1\"") $content }} {{ ` {{ $score := .Params.score }} Verdict: {{ $score }}/5—{{ if eq $score 5 }}Amazing{{ else if eq $score 4 }}Great{{ else if eq $score 3 }}Good{{ else if eq $score 2 }}Mediocre{{ else if eq $score 1 }}Bad{{ else }}Indifferent{{ end}}.

{{ end }}

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 "" }} game cover image {{ end }}

{{ end }} ]]>
{{ end }} {{ end }}