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

Commit

Permalink
feat(socal): add support for custom MastodonPrefix
Browse files Browse the repository at this point in the history
  • Loading branch information
dillonzq committed Feb 8, 2020
1 parent 442f5b0 commit 715cb00
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ dateFormatToUse = "2006-01-02"
#Googlescholar = "xxxx"
#Researchgate = "xxxx"
#Mastodon = "xxxx"
#MastodonPrefix = "https://mastodon.technology/"
#Thingiverse = "xxxx"
#Devto = "xxxx"
#Gitea = "xxxx"
Expand Down
1 change: 1 addition & 0 deletions exampleSite/zh/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ dateFormatToUse = "2006-01-02"
#Googlescholar = "xxxx"
#Researchgate = "xxxx"
#Mastodon = "xxxx"
#MastodonPrefix = "https://mastodon.technology/"
#Thingiverse = "xxxx"
#Devto = "xxxx"
#Gitea = "xxxx"
Expand Down
3 changes: 2 additions & 1 deletion layouts/partials/home/social.html
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@
</a>
{{- end -}}
{{- with .Site.Params.Social.Mastodon}}
<a href="https://mastodon.social/{{ . }}" rel="me noopener noreffer" target="_blank">
{{ $MastodonPrefix := $.Site.Params.Social.MastodonPrefix | default "https://mastodon.social/" }}
<a href="{{ $MastodonPrefix | safeURL }}{{ . }}" rel="me noopener noreffer" target="_blank">
<i class="fab fa-mastodon fa-fw" title="Mastodon"></i>
</a>
{{- end -}}
Expand Down

0 comments on commit 715cb00

Please sign in to comment.