File tree Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Expand file tree Collapse file tree 1 file changed +9
-8
lines changed Original file line number Diff line number Diff line change 11{{ $url := .Destination }}
22{{- if (strings.HasPrefix $url "http") -}}
33 {{/* external link, add icon */}}
4- < a
5- class ="link "
6- href ="{{ $url | safeURL }} "
7- rel ="noopener ">
8- {{- .Text | safeHTML -}}
9- < span class ="pl-1 icon-svg icon-sm ">
10- {{- partialCached "icon" "open_in_new" "open_in_new" -}}
11- </ span > </ a >
4+ < a class ="link " href ="{{ $url | safeURL }} " rel ="noopener ">
5+ {{ .Text | safeHTML }}
6+ < span class ="pl-1 icon-svg icon-sm ">
7+ {{ partialCached "icon" "open_in_new" "open_in_new" }}
8+ </ span >
9+ </ a >
10+ {{- else if (strings.HasPrefix $url "mailto:") -}}
11+ {{/* mailto link, render as normal link */}}
12+ < a class ="link " href ="{{ $url }} "> {{ .Text | safeHTML }}</ a >
1213{{- else if (strings.HasPrefix $url "/") -}}
1314 {{ if (strings.HasSuffix (urls.Parse $url).Path ".md") }}
1415 {{/* abs path to markdown file, use ref */}}
You can’t perform that action at this time.
0 commit comments