more docs + link fixing
This commit is contained in:
parent
6896cb007b
commit
92d18b1ee5
10 changed files with 125 additions and 16 deletions
|
@ -1,2 +1,7 @@
|
|||
{{$trimmed := strings.TrimSuffix ".md" (.Destination | safeURL)}}
|
||||
<a href="{{ if (hasPrefix $trimmed "/") }}{{ $trimmed }}{{ else }}{{ print "/" $trimmed }}{{ end }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{$external := strings.HasPrefix $trimmed "http" }}
|
||||
{{ if $external }}
|
||||
<a href="{{ $trimmed }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{else}}
|
||||
<a href="{{ if (hasPrefix $trimmed "/") }}{{ $trimmed }}{{ else }}{{ print "/" $trimmed }}{{ end }}" rel="noopener">{{ .Text | safeHTML }}</a>
|
||||
{{end}}
|
Loading…
Add table
Add a link
Reference in a new issue