Added JSON file for games listings.
This commit is contained in:
parent
3213326bd1
commit
cf653e54ba
|
@ -10,3 +10,6 @@ paginate = 10
|
||||||
title = "Citra"
|
title = "Citra"
|
||||||
description = "Citra is an open-source emulator for the Nintendo 3DS capable of playing many of your favorite 3DS games."
|
description = "Citra is an open-source emulator for the Nintendo 3DS capable of playing many of your favorite 3DS games."
|
||||||
weight = 1
|
weight = 1
|
||||||
|
|
||||||
|
[outputs]
|
||||||
|
section = [ "HTML", "JSON" ]
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{
|
||||||
|
{{- $lenGames := sub (len .Data.Pages) 1 }}
|
||||||
|
{{- range $index, $element := .Data.Pages }}
|
||||||
|
{{- $game := . }}
|
||||||
|
{{- $gameIndex := $index }}
|
||||||
|
{{- $lenRegions := sub (len .Params.releases) 1 }}
|
||||||
|
{{- range $regionIndex, $element := .Params.releases }}
|
||||||
|
"{{ $element.title }}": { "region": "{{ .region }}", "gameID": "{{ $game.File.BaseFileName }}", "gameName": "{{ $game.Title | plainify }}" }{{- if and (eq $gameIndex $lenGames) (eq $regionIndex $lenRegions) }}{{ else }},{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
{{- end }}
|
||||||
|
}
|
Reference in New Issue