8 lines
431 B
HTML
8 lines
431 B
HTML
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
|
{{- $isRemote:= or (in .Destination ":") ( hasPrefix .Destination "//") -}}
|
|
{{- $destination := .Destination | safeURL -}}
|
|
{{- if not $isRemote -}}
|
|
{{- $destination = $destination | relURL -}}
|
|
{{- end -}}
|
|
<a class="gblog-post__link{{ if $raw }}--raw{{ end }}" href="{{ $destination }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
|