Merge pull request #89 from theEndBeta/master

allow non-standard urls (for telegram, etc) in social links
This commit is contained in:
Dmitry Kolosov 2021-06-28 08:59:13 +03:00 committed by GitHub
commit a6b89f92e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,8 +3,9 @@
{{ range $.Site.Params.Social }} {{ range $.Site.Params.Social }}
{{ if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }} {{ if and (isset $.Site.Data.social.social_icons .id) (isset . "name") }}
{{ $url := index $.Site.Data.social.social_icons .id }} {{ $url := index $.Site.Data.social.social_icons .id }}
{{ $ref := printf $url .name }}
<li> <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) }} {{ partial "fontawesome.html" (dict "iconName" .id "custom" false) }}
</a> </a>
</li> </li>