{{ $id := delimit (slice "gitlab" (partial "functions/uid.html" .)) "-" }} {{- $gitlabURL := print (default "https://gitlab.com/" (.Get "baseURL")) "api/v4/projects/" (.Get "projectID") -}} {{- $gitLabData := dict -}} {{- with try (resources.GetRemote $gitlabURL) -}} {{- with .Err -}} {{- warnf "gitlab shortcode: failed to fetch remote resource from %q: %s" $gitlabURL $.Position -}} {{- else with .Value -}} {{- $gitLabData = . | transform.Unmarshal -}} {{- else -}} {{- warnf "gitlab shortcode: unable to get remote resource from %q: %s" $gitlabURL $.Position -}} {{- end -}} {{- end -}} {{- with $gitLabData -}}
{{ partial "icon.html" "gitlab" }}
{{ .name_with_namespace | markdownify }}

{{ .description | markdownify }}

{{ partial "icon.html" "star" }}
{{ .star_count }}
{{ partial "icon.html" "fork" }}
{{ .forks_count }}
{{ $fetchRepo := resources.Get "js/fetch-repo.js" }} {{ $fetchRepo = $fetchRepo | resources.Minify | resources.Fingerprint ($.Site.Params.fingerprintAlgorithm | default "sha512") }}
{{- end -}}