MtF-wiki/layouts/shortcodes/gh-profile.html

9 lines
294 B
HTML

{{- $name := .Get 1 -}}
{{- with getJSON (printf "https://api.github.com/users/%s" (.Get 0)) -}}
<a class="github-profile" href="{{ .html_url }}" title="{{ $name | default .name }}">
<img src="{{ .avatar_url }}">
<b>{{ $name | default .name }}</b>
<i class="bi bi-github"></i>
</a>
{{- end -}}