Merge pull request #57 from dillonzq/feature/custom_mastodon_url

feat(socal): add support for custom MastodonPrefix
This commit is contained in:
Dillon 2020-02-08 19:57:09 +08:00 committed by GitHub
commit c5e64a9a61
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 1 deletions

View file

@ -246,6 +246,7 @@ dateFormatToUse = "2006-01-02"
#Googlescholar = "xxxx"
#Researchgate = "xxxx"
#Mastodon = "xxxx"
#MastodonPrefix = "https://mastodon.technology/"
#Thingiverse = "xxxx"
#Devto = "xxxx"
#Gitea = "xxxx"

View file

@ -246,6 +246,7 @@ dateFormatToUse = "2006-01-02"
#Googlescholar = "xxxx"
#Researchgate = "xxxx"
#Mastodon = "xxxx"
#MastodonPrefix = "https://mastodon.technology/"
#Thingiverse = "xxxx"
#Devto = "xxxx"
#Gitea = "xxxx"

View file

@ -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 -}}