diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html
index e2ecb09..1afa930 100644
--- a/layouts/_default/_markup/render-link.html
+++ b/layouts/_default/_markup/render-link.html
@@ -5,31 +5,12 @@
{{ $isWebLink := or $isExternalLink (eq 0 (.Destination | strings.Count ":")) }}
{{ $isTelLink := strings.HasPrefix .Destination "tel:" }}
{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
-{{ $hasSlash := in .Destination "/" }}
{{- if $isWebLink -}}
+ {{ $hasSlash := in .Destination "/" }}
{{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.File.Dir .Destination) .Destination }}
{{ .Text | safeHTML }}
-{{- else -}}
- {{- $separators := cond $isMailtoLink ":@." ":" -}}
- {{- $regex := cond $isMailtoLink "[a-z]*:(.*)" "[a-z]*:([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})"}}
- {{- $replace := cond $isMailtoLink "$1" "$1 $2 $3 $4 $5" -}}
- {{- $string := .Destination -}}
- {{- $params := slice -}}
-
- {{- range split $separators "" }}
- {{ $parts := split $string . }}
- {{ $params = $params | append (index $parts 0) }}
- {{ $string = index $parts 1 }}
- {{ end }}
- {{- $params = $params | append (string $string) -}}
-
-
+{{- else if $isMailtoLink -}}
+ {{ partial "contact/mail" .Destination }}
+{{- else if $isTelLink -}}
+ {{ partial "contact/telephone" .Destination }}
{{- end -}}
diff --git a/layouts/partials/contact/mail.html b/layouts/partials/contact/mail.html
index 8c8697a..ba9e703 100644
--- a/layouts/partials/contact/mail.html
+++ b/layouts/partials/contact/mail.html
@@ -1,9 +1,12 @@
-{{- with .Site.Data.contact.mail -}}
{{- $protocol := "mailto" -}}
{{- $mail := . -}}
-{{- $mailWithProtocol := print $protocol ":" . -}}
+{{- $mailWithProtocol := $mail -}}
+{{- if strings.HasPrefix $mail $protocol -}}
+ {{- $mail = substr $mail 7 -}}
+{{- else -}}
+ {{- $mailWithProtocol = print $protocol ":" $mail -}}
+{{- end -}}
{{ range $index := seq (sub (len $mail) 1) 0}}{{ substr $mail $index 1}}{{ end }}
-{{- end -}}
diff --git a/layouts/partials/contact/telephone.html b/layouts/partials/contact/telephone.html
index 9a73418..dc73641 100644
--- a/layouts/partials/contact/telephone.html
+++ b/layouts/partials/contact/telephone.html
@@ -1,9 +1,12 @@
-{{- with .Site.Data.contact.telephone -}}
{{- $protocol := "tel" -}}
{{- $tel := . -}}
-{{- $telWithProtocol := print $protocol ":" (replace $tel " " "") -}}
+{{- $telWithProtocol := $tel -}}
+{{- if strings.HasPrefix $tel $protocol -}}
+ {{- $tel = substr $tel 4 -}}
+{{- else -}}
+ {{- $telWithProtocol := print $protocol ":" (replace $tel " " "") -}}
+{{- end -}}
{{ range $index := seq (sub (len $tel) 1) 0}}{{ substr $tel $index 1}}{{ end }}
-{{- end -}}
diff --git a/layouts/shortcodes/mail.html b/layouts/shortcodes/mail.html
index 6444fbe..6b81648 100644
--- a/layouts/shortcodes/mail.html
+++ b/layouts/shortcodes/mail.html
@@ -1 +1 @@
-{{- partial "contact/mail" . -}}
+{{- partial "contact/mail" .Site.Data.contact.mail -}}
diff --git a/layouts/shortcodes/telephone.html b/layouts/shortcodes/telephone.html
index 8b944b0..fe6b17c 100644
--- a/layouts/shortcodes/telephone.html
+++ b/layouts/shortcodes/telephone.html
@@ -1 +1 @@
-{{- partial "contact/telephone" . -}}
+{{- partial "contact/telephone" .Site.Data.contact.telephone -}}