{{ $id := delimit (slice "github" (partial "functions/uid.html" .)) "-" }} {{- $githubURL := print "https://api.github.com/repos/" (.Get "repo") -}} {{- $githubData := resources.GetRemote $githubURL | transform.Unmarshal -}} {{- $githubThumbnailURL := print "https://opengraph.githubassets.com/0/" (.Get "repo") -}} {{- $showThumbnail := .Get "showThumbnail" | default true -}}
{{- with $githubData -}}
{{- if $showThumbnail -}}
GitHub Repository Thumbnail
{{- end -}}
{{ partial "icon.html" "github" }}
{{ .full_name | markdownify }}

{{ .description | markdownify }}

{{ $language := .language | default "fallback" }} {{ $className := printf "background-color-%s" (md5 $language) }}
{{ if .language }}{{ .language }}{{ else }}null{{ end }}
{{ partial "icon.html" "star" }}
{{ .stargazers_count }}
{{ partial "icon.html" "fork" }}
{{ .forks }}
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }} {{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{- end -}}