mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-28 07:14:05 -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" "-" }}
|
||||
{{$external := strings.HasPrefix $dashedurl "http" }}
|
||||
{{- if $external -}}
|
||||
<a href="{{ $dashedurl }}" target="_blank" rel="noopener noreferrer">{{ .Text | safeHTML }}</a>
|
||||
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{- else -}}
|
||||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
||||
{{$spacedurl := replace $trimmed "%20" " " }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user