fix: Remove warning

This commit is contained in:
Simon 2021-05-12 08:41:33 +02:00
parent 5f4e1ecfd2
commit 751540776c
1 changed files with 1 additions and 2 deletions

View File

@ -7,7 +7,7 @@
{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
{{ $hasSlash := in .Destination "/" }}
{{- if $isWebLink -}}
{{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.Dir .Destination) .Destination }}
{{ $link := cond (and $isWebLink (and (not $hasSlash) (not $isExternalLink))) (path.Join "/" .Page.File.Dir .Destination) .Destination }}
<a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isExternalLink }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
{{- else -}}
{{- $separators := cond $isMailtoLink ":@." ":" -}}
@ -33,4 +33,3 @@
>
</span>
{{- end -}}