Use GitHub API to fetch latest openBVE version
This commit is contained in:
parent
256afa60a8
commit
aea1dba197
16 changed files with 31 additions and 15 deletions
16
layouts/shortcodes/openbve_notice.html
Normal file
16
layouts/shortcodes/openbve_notice.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
{{ $currentlang := .Site.Language.Lang }}
|
||||
|
||||
{{ $urlPre := "https://api.github.com" }}
|
||||
{{ $releaseJ := getJSON $urlPre "/repos/leezer3/OpenBVE/releases" }}
|
||||
{{ range first 1 (where $releaseJ ".prerelease" false) }}
|
||||
{{ $latestversion := .tag_name }}
|
||||
|
||||
{{ if eq $currentlang "ca" }}
|
||||
<i>Assegureu-vos sempre que teniu la versió més recent ({{ print $latestversion }}) de l'openBVE, disponible al <a href="http://www.openbve-project.net" target="_blank">lloc web oficial</a> del simulador, i instal·leu el fitxer OBP des del Gestor de paquets.</i>
|
||||
{{ else if eq $currentlang "es" }}
|
||||
<i>Asegúrate siempre de que tienes la versión más reciente ({{ print $latestversion }}) de openBVE, disponible en el <a href="http://www.openbve-project.net" target="_blank">sitio web oficial</a> del simulador, e instala el archivo OBP desde el Gestor de paquetes.</i>
|
||||
{{ else }}
|
||||
<i>Always make sure you have the latest ({{ print $latestversion }}) openBVE version, available at the simulator's <a href="http://www.openbve-project.net" target="_blank">official website</a>, and install the OBP file from the Package Manager.</i>
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue