fix(social): fix social link bug (#81)

This commit is contained in:
Dillon 2020-02-19 18:55:40 +08:00
parent 16320fa91b
commit 02919a7d48
3 changed files with 6 additions and 6 deletions

View file

@ -212,12 +212,12 @@ dateFormatToUse = "2006-01-02"
# Vine = "xxxx"
# Googlescholar = "xxxx"
# Researchgate = "xxxx"
# Mastodon = "xxxx"
# MastodonPrefix = "https://mastodon.technology/"
# Mastodon = "@xxxx"
# MastodonPrefix = "https://mastodon.technology"
# Thingiverse = "xxxx"
# Devto = "xxxx"
# Gitea = "xxxx"
# XMPP = "xxxx"
# XMPP = "xxxx@example.com"
# Matrix = "xxxx"
# Bilibili = "xxxx"

View file

@ -1,3 +1,3 @@
<a href="{{ index . `href` }}" rel="me noopener noreffer" target="_blank" title="{{ index . `title` }}">
<a href="{{ index . `href` | safeURL }}" rel="me noopener noreffer" target="_blank" title="{{ index . `title` }}">
{{- partial "function/icon.html" . -}}
</a>

View file

@ -378,8 +378,8 @@
{{- /* 055: Mastodon */ -}}
{{- with .Site.Params.Social.Mastodon -}}
{{- $MastodonPrefix := $.Site.Params.Social.MastodonPrefix | default "https://mastodon.social/" -}}
{{- $options := dict "href" $MastodonPrefix "title" "Mastodon" -}}
{{- $MastodonPrefix := $.Site.Params.Social.MastodonPrefix | default "https://mastodon.social" -}}
{{- $options := dict "href" (printf "%s/%s" $MastodonPrefix .) "title" "Mastodon" -}}
{{- $options = dict "class" "fab fa-mastodon fa-fw" | merge $options -}}
{{- partial "function/icon-link.html" $options -}}
{{- end -}}