From f50cd6e5c9a86082b48658c06a4b3c827f452dc6 Mon Sep 17 00:00:00 2001 From: Dwayne Charrington Date: Thu, 19 Dec 2024 21:52:13 +1000 Subject: [PATCH] feat(theme): enhance link rendering for GitHub sponsors Updated the link rendering logic to differentiate between GitHub repositories and GitHub Sponsors, improving URL handling for better user experience. --- themes/aurelia-theme/layouts/_default/_markup/render-link.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/aurelia-theme/layouts/_default/_markup/render-link.html b/themes/aurelia-theme/layouts/_default/_markup/render-link.html index d50364f..e5b24c4 100644 --- a/themes/aurelia-theme/layouts/_default/_markup/render-link.html +++ b/themes/aurelia-theme/layouts/_default/_markup/render-link.html @@ -4,7 +4,8 @@ {{ $isStackBlitz := findRE "stackblitz.com/edit/([^/?]+)" $url 1 }} {{ $isCodePen := findRE "codepen.io/([^/]+)/pen/([^/?]+)" $url 1 }} {{ $isNpmPackage := findRE "npmjs.com/package/([^/?]+)" $url 1 }} -{{ $isGitHubRepo := findRE "github.com/([^/]+/[^/]+)(?:/|$)" $url 1 }} +{{ $isGitHubSponsors := findRE "github.com/sponsors/" $url 1 }} +{{ $isGitHubRepo := and (not $isGitHubSponsors) (findRE "github.com/([^/]+/[^/]+)(?:/|$)" $url 1) }} {{ $isDumberGist := findRE "gist.dumber.app/\\?gist=([^/?&]+)" $url 1 }} {{ if $isYoutube }}