Merge pull request #1625 from wtchangdm/main

Fix warning caused by data.GetJSON
This commit is contained in:
Nuno Coração 2024-08-10 10:39:26 +01:00 committed by GitHub
commit bb6f8baf12
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{{ $id := delimit (slice "codeberg" (partial "functions/uid.html" .)) "-" }}
{{- $codebergURL := print "https://codeberg.org/api/v1/repos/" (.Get "repo") -}}
{{- $codebergData := getJSON ($codebergURL) -}}
{{- $codebergData := resources.GetRemote $codebergURL | transform.Unmarshal -}}
{{- $codebergColors := .Site.Data.codebergColors -}}
{{- with $codebergData -}}

View file

@ -1,6 +1,6 @@
{{ $id := delimit (slice "github" (partial "functions/uid.html" .)) "-" }}
{{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}}
{{- $githubData := getJSON ($githubURL) -}}
{{- $githubData := resources.GetRemote $githubURL | transform.Unmarshal -}}
{{- $githubColors := .Site.Data.githubColors -}}
{{- with $githubData -}}

View file

@ -1,7 +1,7 @@
{{ $id := delimit (slice "gitlab" (partial "functions/uid.html" .)) "-" }}
{{- $gitlabURL := print (default "https://gitlab.com/" (.Get "baseURL")) "api/v4/projects/" (.Get "projectID") -}}
{{- $gitLabData := getJSON ($gitlabURL) -}}
{{- $gitLabData := resources.GetRemote $gitlabURL | transform.Unmarshal -}}
{{- with $gitLabData -}}
<a id="{{ $id }}" target="_blank" href="{{ .web_url }}" class="cursor-pointer">