From c1aca647c7f1013b68d28308f01cb7d76931133c Mon Sep 17 00:00:00 2001 From: DioDuPiMa Date: Wed, 5 Apr 2023 00:47:46 +0100 Subject: [PATCH] [ADD] Base URL option for short code and an appropriate default for gitlab's public instance --- layouts/shortcodes/gitlab.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/layouts/shortcodes/gitlab.html b/layouts/shortcodes/gitlab.html index 4364ce86..ce210dac 100644 --- a/layouts/shortcodes/gitlab.html +++ b/layouts/shortcodes/gitlab.html @@ -1,5 +1,5 @@ -{{- $gitlabData := getJSON (print "https://gitlab.com/api/v4/projects/" (.Get "repo_id")) -}} -{{- with $gitlabData -}} +{{- $gitLabData := getJSON (print (default "https://gitlab.com/" (.Get "baseURL")) "api/v4/projects/" (.Get "projectID")) -}} +{{- with $gitLabData -}}