🚧 optimization other settings.

This commit is contained in:
凡梦星尘
2022-06-30 08:04:32 +08:00
parent dafea2e479
commit ec5d8419e1
6 changed files with 13 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
{{- $extURL := .Page.Site.Params.exturl.enable }}
<a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if strings.HasPrefix .Destination "http" }}rel="noopener external nofollow noreferrer" target="_blank"{{ end }} {{ if $extURL }}class=" exturl"{{ end }}>
{{- $extURL := and .Page.Site.Params.exturl.enable (strings.HasPrefix .Destination "http") }}
<a href="{{ .Destination | safeURL }}" title="{{ .Text }}" {{ if $extURL }}rel="noopener external nofollow noreferrer" target="_blank" class=" exturl"{{ end }}>
{{ .Text | safeHTML }}
{{- if and $extURL .Page.Site.Params.exturl.icon }}
<i class="fa fa-external-link-alt"></i>