www.byjp.me/layouts/partials/syndication.html
JP Hastings-Spital ee7d4d38f6 Syndication icons
2023-10-23 22:27:10 +01:00

28 lines
1.6 KiB
HTML

{{ $mailto := delimit (slice "mailto:" site.Author.email "?subject=Re:%20" ( .Title | htmlEscape ) "&body=" (htmlEscape "Hi JP!\n\nI was reading your blog…")) "" }}
{{ partial "syndication-ref.html" (dict "type" "email" "link" $mailto) }}
{{ range .Params.syndications }}
{{ if hasPrefix . "https://bsky.app/" }}
{{ partial "syndication-ref.html" (dict "type" "bluesky" "link" .) }}
{{ else if hasPrefix . "https://pixelfed.social/" }}
{{ partial "syndication-ref.html" (dict "type" "pixelfed" "link" .) }}
{{ else if hasPrefix . "https://www.facebook.com/" }}
{{ partial "syndication-ref.html" (dict "type" "facebook" "link" .) }}
{{ else if hasPrefix . "https://www.instagram.com/" }}
{{ partial "syndication-ref.html" (dict "type" "instagram" "link" .) }}
{{ else if hasPrefix . "https://hachyderm.io/" }}
{{ partial "syndication-ref.html" (dict "type" "mastodon" "link" .) }}
{{ else if hasPrefix . "https://www.goodreads.com/" }}
{{ partial "syndication-ref.html" (dict "type" "goodreads" "link" .) }}
{{ else if hasPrefix . "https://trakt.tv/" }}
{{ partial "syndication-ref.html" (dict "type" "trakt" "link" .) }}
{{ else if hasPrefix . "https://medium.com/" }}
{{ partial "syndication-ref.html" (dict "type" "medium" "link" .) }}
{{ else if hasPrefix . "https://soundcloud.com/" }}
{{ partial "syndication-ref.html" (dict "type" "soundcloud" "link" .) }}
{{ else if hasPrefix . "https://deliveroo.engineering/" }}
{{ partial "syndication-ref.html" (dict "type" "deliveroo" "link" .) }}
{{ else }}
{{ partial "syndication-ref.html" (dict "type" "" "link" .) }}
{{ end }}
{{end}}