mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-30 16:24:06 -06:00
Remove noreferrer for external links. Remove open in new tab for external links
This commit is contained in:
parent
3db6448229
commit
3852d4637b
@ -1,7 +1,7 @@
|
|||||||
{{$dashedurl := replace .Destination "%20" "-" }}
|
{{$dashedurl := replace .Destination "%20" "-" }}
|
||||||
{{$external := strings.HasPrefix $dashedurl "http" }}
|
{{$external := strings.HasPrefix $dashedurl "http" }}
|
||||||
{{- if $external -}}
|
{{- if $external -}}
|
||||||
<a href="{{ $dashedurl }}" target="_blank" rel="noopener noreferrer">{{ .Text | safeHTML }}</a>
|
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
||||||
{{$spacedurl := replace $trimmed "%20" " " }}
|
{{$spacedurl := replace $trimmed "%20" " " }}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user