Skip to content
This repository was archived by the owner on Mar 9, 2022. It is now read-only.

Commit

Permalink
fix(social): fix social link bug (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 19, 2020
1 parent 16320fa commit 02919a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/function/icon-link.html
Original file line number Diff line number Diff line change
@@ -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>
4 changes: 2 additions & 2 deletions layouts/partials/home/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 -}}
Expand Down

0 comments on commit 02919a7

Please sign in to comment.