Replace use of add with path.Join for buildig paths.
This commit is contained in:
parent
4336c6b036
commit
56d3c30a98
1 changed files with 13 additions and 13 deletions
|
|
@ -2,7 +2,7 @@
|
|||
{{ $newtab := .Get "newtab" | default false -}}
|
||||
{{ $src := .Get "src" -}}
|
||||
{{ $text := .Get "text" -}}
|
||||
{{ if and $src (fileExists (add "/assets" $src)) -}}
|
||||
{{ if and $src (fileExists (path.Join "/assets" $src)) -}}
|
||||
{{ $original := resources.Get $src -}}
|
||||
{{ $src = $original.RelPermalink -}}
|
||||
{{ end -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue