File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ <h2 class="modal-title" id="previous-releases-label">Previous Releases</h2>
2626 {{ $toReplace := printf "://%s@" $githubToken }}
2727 {{ $tokenInUrl := cond (eq $githubToken "") "://" $toReplace }}
2828 {{ $urlWithToken := replace $url "://" $tokenInUrl }}
29- {{ $releases := getJSON $urlWithToken }}
29+ {{ $releasesJson := resources.GetRemote $urlWithToken }}
30+ {{ $releases := $releasesJson | transform.Unmarshal }}
3031 {{ range sort $releases "created_at" "desc" }}
3132 <!-- Expand / Collapse -->
3233 {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }}
Original file line number Diff line number Diff line change 3535{{ $tokenInUrl := cond (eq $githubToken "") "://" $toReplace }}
3636{{ $apiUrlWithToken := replace $apiUrl "://" $tokenInUrl }}
3737
38- {{ $apiResults := getJSON $apiUrlWithToken }}
38+ {{ $apiResultsJson := resources.GetRemote $apiUrlWithToken }}
39+ {{ $apiResults := $apiResultsJson | transform.Unmarshal }}
40+
3941{{ $content := base64Decode $apiResults.content }}
4042{{ $codeSnippet := $content }}
4143
Original file line number Diff line number Diff line change 2525 {{ $tokenInUrl :=cond (eq $githubToken "") "://" $toReplace }}
2626 {{ $url := replace $url "://" $tokenInUrl }}
2727
28- {{ range getJSON $url }}
28+ {{ $contributorJson := resources.GetRemote $url }}
29+ {{ $contributors := $contributorJson | transform.Unmarshal }}
30+
31+ {{ range $contributors }}
2932 < div style ="padding: 10px; ">
3033 < img
3134 src ="{{.avatar_url}} "
Original file line number Diff line number Diff line change 44 {{ $toReplace := printf "://%s@" $githubToken }}
55 {{ $tokenInUrl :=cond (eq $githubToken "") "://" $toReplace }}
66 {{ $url := replace $url "://" $tokenInUrl }}
7- {{ $jsonUrl := getJSON $url }}
7+ {{ $userJson := resources.GetRemote $url }}
8+ {{ $user := $userJson | transform.Unmarshal }}
89
910 < div class ="card text-center bg-transparent border-0 p-2 h-100 " style ="max-width: 12rem; ">
10- < img src ="{{$jsonUrl .avatar_url}} " class ="card-img-top mx-auto " alt ="{{$jsonUrl .name}} " style ="max-width: 122px; ">
11+ < img src ="{{$user .avatar_url}} " class ="card-img-top mx-auto " alt ="{{$user .name}} " style ="max-width: 122px; ">
1112 < div class ="card-body pb-0 px-1 ">
1213 < p class ="card-text m-0 ">
13- {{$jsonUrl .name}}
14+ {{$user .name}}
1415 </ p >
1516 </ div >
1617 < div class ="card-footer bg-transparent border-0 px-1 ">
1718 < p >
18- < a href ="{{$jsonUrl .html_url}} "> @{{$jsonUrl .login}}</ a >
19+ < a href ="{{$user .html_url}} "> @{{$user .login}}</ a >
1920 </ p >
2021 </ div >
2122 </ div >
You can’t perform that action at this time.
0 commit comments