fix: Remove warning
This commit is contained in:
parent
5f4e1ecfd2
commit
751540776c
|
@ -7,7 +7,7 @@
|
||||||
{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
|
{{ $isMailtoLink := strings.HasPrefix .Destination "mailto:" }}
|
||||||
{{ $hasSlash := in .Destination "/" }}
|
{{ $hasSlash := in .Destination "/" }}
|
||||||
{{- if $isWebLink -}}
|
{{- 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>
|
<a href="{{ $link | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if $isExternalLink }} target="_blank" rel="noopener"{{ end }}>{{ .Text | safeHTML }}</a>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $separators := cond $isMailtoLink ":@." ":" -}}
|
{{- $separators := cond $isMailtoLink ":@." ":" -}}
|
||||||
|
@ -33,4 +33,3 @@
|
||||||
>
|
>
|
||||||
</span>
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue