fix: Remove warning
This commit is contained in:
parent
5f4e1ecfd2
commit
751540776c
|
@ -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 -}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue