diff --git a/layouts/_default/_markup/render-link.html b/layouts/_default/_markup/render-link.html index ce4701398413..39e53cd65a80 100644 --- a/layouts/_default/_markup/render-link.html +++ b/layouts/_default/_markup/render-link.html @@ -1,14 +1,15 @@ {{ $url := .Destination }} {{- if (strings.HasPrefix $url "http") -}} {{/* external link, add icon */}} - - {{- .Text | safeHTML -}} - - {{- partialCached "icon" "open_in_new" "open_in_new" -}} - + + {{ .Text | safeHTML }} + + {{ partialCached "icon" "open_in_new" "open_in_new" }} + + +{{- else if (strings.HasPrefix $url "mailto:") -}} + {{/* mailto link, render as normal link */}} + {{ .Text | safeHTML }} {{- else if (strings.HasPrefix $url "/") -}} {{ if (strings.HasSuffix (urls.Parse $url).Path ".md") }} {{/* abs path to markdown file, use ref */}}