mirror of
https://github.com/thegeeklab/hugo-geekblog.git
synced 2024-11-21 20:50:40 +00:00
fix: remove relURL function from render-link template
This commit is contained in:
parent
673dc72be0
commit
999f05049a
@ -1,7 +1,2 @@
|
|||||||
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
{{- $raw := or (hasPrefix .Text "<img") (hasPrefix .Text "<figure") -}}
|
||||||
{{- $isRemote:= or (in .Destination ":") ( hasPrefix .Destination "//") -}}
|
<a class="gblog-post__link{{ if $raw }}--raw{{ end }}" href="{{ .Destination | safeURL }}"{{ with .Title }} title="{{ . }}"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||||
{{- $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>
|
|
||||||
|
Loading…
Reference in New Issue
Block a user