Skip to content
Snippets Groups Projects
Unverified Commit adb26612 authored by Lars Bilke's avatar Lars Bilke
Browse files

[web] Use resources.GetRemote | transform.Unmarshall instead of GetJSON.

parent 724f7036
No related branches found
No related tags found
No related merge requests found
......@@ -160,8 +160,11 @@
{{ if eq $type "GitHub" }}
{{ .Content }}
{{ else }}
{{ $urlPre := "https://gitlab.opengeosys.org/api/v4" }}
{{ $release := getJSON $urlPre "/projects/120/releases/" .Params.tag }}
{{ $release.description | markdownify }}
{{ $data := dict }}
{{ $url := print "https://gitlab.opengeosys.org/api/v4/projects/120/releases/" .Params.tag }}
{{ with resources.GetRemote $url }}
{{ $data = . | transform.Unmarshal }}
{{ end }}
{{ $data.description | markdownify }}
{{ end }}
</div>
......@@ -62,9 +62,12 @@
<li><a href="{{ .Permalink }}">{{ .Title }}</a>, {{.Params.release_date}}</li>
{{ end }}
{{ end }}
{{ $urlPre := "https://api.github.com" }}
{{ $releases := getJSON $urlPre "/repos/ufz/ogs/releases" }}
{{ range $index, $element := $releases }}
{{ $data := dict }}
{{ $url := "https://api.github.com/repos/ufz/ogs/releases" }}
{{ with resources.GetRemote $url }}
{{ $data = . | transform.Unmarshal }}
{{ end }}
{{ range $index, $element := $data }}
{{ if not (eq $index 0) }}
{{ if and (not .draft) (not .prerelease) }}
<li>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment