add render-link hook

This commit is contained in:
Helmut Merz 2022-04-02 11:59:05 +02:00
parent 0efa5514d6
commit a388cd4bcf
2 changed files with 6 additions and 1 deletions

View file

@ -0,0 +1,5 @@
{{- if hasPrefix .Destination "https://" -}}
<a href="{{ .Destination }}" target="_blank">{{ .Text }}</a>
{{- else -}}
<a href="{{ .Destination }}">{{ .Text }}</a>
{{- end -}}

View file

@ -25,4 +25,4 @@
{{- else -}}
<img src="{{ $image.RelPermalink }}" alt="{{ $alt }}" class="{{ $class }}">
{{- end -}}
</p>
</p>