1
0
Fork 0
mirror of https://github.com/dillonzq/LoveIt.git synced 2025-03-13 11:18:15 +01:00

Merge pull request from dillonzq/fix/social_link_href

fix(social): fix social link bug ()
This commit is contained in:
Dillon 2020-02-19 18:59:21 +08:00 committed by GitHub
commit 58555274f5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions
exampleSite
layouts/partials

View file

@ -212,12 +212,12 @@ dateFormatToUse = "2006-01-02"
# Vine = "xxxx" # Vine = "xxxx"
# Googlescholar = "xxxx" # Googlescholar = "xxxx"
# Researchgate = "xxxx" # Researchgate = "xxxx"
# Mastodon = "xxxx" # Mastodon = "@xxxx"
# MastodonPrefix = "https://mastodon.technology/" # MastodonPrefix = "https://mastodon.technology"
# Thingiverse = "xxxx" # Thingiverse = "xxxx"
# Devto = "xxxx" # Devto = "xxxx"
# Gitea = "xxxx" # Gitea = "xxxx"
# XMPP = "xxxx" # XMPP = "xxxx@example.com"
# Matrix = "xxxx" # Matrix = "xxxx"
# Bilibili = "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" . -}} {{- partial "function/icon.html" . -}}
</a> </a>

View file

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