From 06053a45a6165b93d13b2666a220a3a1261e1d6d Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 30 Jan 2025 16:48:49 +0530 Subject: [PATCH 1/2] fix the build --- layouts/shortcodes/github.html | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html index c71271d412..d8811049fb 100644 --- a/layouts/shortcodes/github.html +++ b/layouts/shortcodes/github.html @@ -2,10 +2,7 @@ {{ if (.Get "ref") }} {{ $ref = printf "?ref=%s" (.Get "ref") }} {{ end }} -{{ $url := "https://api.github.com/repos/" }} -{{ $opts := dict - (.Get "repo") "/contents/" (.Get "file") $ref -}} +{{ $json := resources.GetRemote "https://api.github.com/repos/" (.Get "repo") "/contents/" (.Get "file") $ref }} {{ $json := resources.GetRemote $url $opts }} {{ $data := $json | transform.Unmarshal }} {{ $con := base64Decode $data.content }} From 48d1fefe325c4822b6ba2cdccc61ef15fbc163df Mon Sep 17 00:00:00 2001 From: Harsh Mishra Date: Thu, 30 Jan 2025 16:52:15 +0530 Subject: [PATCH 2/2] re-fix --- layouts/shortcodes/github.html | 1 - 1 file changed, 1 deletion(-) diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html index d8811049fb..2f6632bac2 100644 --- a/layouts/shortcodes/github.html +++ b/layouts/shortcodes/github.html @@ -3,7 +3,6 @@ {{ $ref = printf "?ref=%s" (.Get "ref") }} {{ end }} {{ $json := resources.GetRemote "https://api.github.com/repos/" (.Get "repo") "/contents/" (.Get "file") $ref }} -{{ $json := resources.GetRemote $url $opts }} {{ $data := $json | transform.Unmarshal }} {{ $con := base64Decode $data.content }} {{ $content := "" }}