diff options
author | Ivan Boothe <git@rootwork.org> | 2022-06-30 23:57:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-30 23:57:19 +0300 |
commit | 69751d47e52293c22100bdd297679dacb9f4e9e3 (patch) | |
tree | bee11193e68cb04224f29540dc84e9705beb70b9 /layouts | |
parent | 77f33ab9841416cfcbd0e5e85a0c14d8b601a5e4 (diff) | |
parent | 0efdd7a84ae133b71bf1daa12cc09c6dfe4c7824 (diff) |
Merge pull request #324 from chipzoller/baseurl-fixes
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/_default/_markup/render-image.html | 3 | ||||
-rw-r--r-- | layouts/partials/image.html | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/layouts/_default/_markup/render-image.html b/layouts/_default/_markup/render-image.html index 5ca7332..2ddb29a 100644 --- a/layouts/_default/_markup/render-image.html +++ b/layouts/_default/_markup/render-image.html @@ -1,4 +1,5 @@ {{- $file := .Destination -}} +{{- $imagesDir := .Page.Site.Params.imagesDir -}} {{- $alt := .Text -}} {{- $cap := .Title -}} {{- $scratch := newScratch -}} @@ -24,7 +25,7 @@ {{- $image = "" -}} {{- $scratch.Add "classes" " image_svg" -}} {{- else -}} - {{- $file = path.Join "images" $image -}} + {{- $file = path.Join $imagesDir $image -}} {{- $image = $image.Content | resources.FromString $file -}} {{- end -}} {{- else -}} diff --git a/layouts/partials/image.html b/layouts/partials/image.html index c9b9662..a5cae3e 100644 --- a/layouts/partials/image.html +++ b/layouts/partials/image.html @@ -1,4 +1,5 @@ {{- $file := .file -}} +{{- $imagesDir := .Page.Site.Params.imagesDir -}} {{- $alt := .alt -}} {{- if not $alt -}} {{- $alt = .Text -}} @@ -34,7 +35,7 @@ {{- $image = "" -}} {{- $scratch.Add "classes" " image_svg" -}} {{- else -}} - {{- $file = path.Join "images" $image -}} + {{- $file = path.Join $imagesDir $image -}} {{- $image = $image.Content | resources.FromString $file -}} {{- end -}} {{- else -}} |