|
|
@ -1,9 +1,9 @@
|
|
|
|
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
|
|
|
{{$dashedurl := replace .Destination "%20" "-" }}
|
|
|
|
{{$dashedurl := replace $trimmed "%20" "-" }}
|
|
|
|
|
|
|
|
{{$external := strings.HasPrefix $dashedurl "http" }}
|
|
|
|
{{$external := strings.HasPrefix $dashedurl "http" }}
|
|
|
|
{{- if $external -}}
|
|
|
|
{{- if $external -}}
|
|
|
|
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
|
|
|
<a href="{{ $dashedurl }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
|
|
|
{{- else -}}
|
|
|
|
{{- else -}}
|
|
|
|
|
|
|
|
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
|
|
|
{{$spacedurl := replace $trimmed "%20" " " }}
|
|
|
|
{{$spacedurl := replace $trimmed "%20" " " }}
|
|
|
|
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
|
|
|
|
{{$fixedUrl := (cond (hasPrefix $spacedurl "/") $spacedurl (print "/" $spacedurl)) | urlize}}
|
|
|
|
{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}}
|
|
|
|
{{$nonexistent := eq (.Page.GetPage $spacedurl).RelPermalink ""}}
|
|
|
|