Skip to content

Commit

Permalink
feat(theme): enhance link rendering for GitHub sponsors
Browse files Browse the repository at this point in the history
Updated the link rendering logic to differentiate between GitHub repositories and GitHub Sponsors, improving URL handling for better user experience.
  • Loading branch information
Vheissu committed Dec 19, 2024
1 parent 10c43db commit f50cd6e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit f50cd6e

Please sign in to comment.