allow non-standard urls (for telegram, etc) in social links

This commit is contained in:
Aidan Stein 2021-06-27 17:49:19 -04:00
parent 7fb4482d20
commit b29bceddc0

View File

@ -3,8 +3,9 @@
{{ range $.Site.Params.Social }}
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }}
{{ $url := index $.Site.Data.social.social_icons .id }}
{{ $ref := printf $url .name }}
<li>
<a href="{{ printf $url .name }}" title="{{ humanize .id }}" rel="me">
<a {{ printf "href=%q" $ref | safeHTMLAttr }} title="{{ humanize .id }}" rel="me">
{{ partial "fontawesome.html" (dict "iconName" .id "custom" false) }}
</a>
</li>