replaceRE

This commit is contained in:
Marcell Mars 2020-03-05 12:58:29 +01:00
parent 4fc92ee74f
commit 4faf85e0aa
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@
<a href="/topic/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $destination }} not found</span></a> <a href="/topic/{{ $destination }}/{{ if eq hugo.Environment "offline" }}index.html{{ end }}">{{ $text_link }}⦚<span class="text-xs font-bold p-1 bg-AuChico text-CoconutCream">topic:{{ $destination }} not found</span></a>
{{ end }} {{ end }}
{{ else if findRE "^.*static" .Destination }} {{ else if findRE "^.*static" .Destination }}
<img src="{{ (replace "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> <img src="{{ (replaceRE "^.*static" "" .Destination ) | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
{{ else }} {{ else }}
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} /> <img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}"{{ end }} />
{{ end }} {{ end }}