diff --git a/layouts/shortcodes/github.html b/layouts/shortcodes/github.html
index c71271d412..2f6632bac2 100644
--- a/layouts/shortcodes/github.html
+++ b/layouts/shortcodes/github.html
@@ -2,11 +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 $url $opts }}
+{{ $json := resources.GetRemote "https://api.github.com/repos/" (.Get "repo") "/contents/" (.Get "file") $ref }}
{{ $data := $json | transform.Unmarshal }}
{{ $con := base64Decode $data.content }}
{{ $content := "" }}