Skip to content

Commit

Permalink
Merge pull request #27 from CodeYourFuture/feature/images
Browse files Browse the repository at this point in the history
Fix: reroute images - merging to test routing on deploy preview
  • Loading branch information
SallyMcGrath authored Sep 14, 2023
2 parents cf515aa + 9e7cefb commit 27b8c9e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions layouts/_default/_markup/render-image.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{{/* The way this site is set up is confusing Hugo and it's not looking in its
bundle folder for its assets.
<!--//-->
Longer term, we might change this from readme.md to index.md and this code can
be removed.
<!--//-->
But for now, we will just reroute images saved into the CMS */}} {{ if in
.Destination "http" }}
<a href="{{ .Destination }}">
<img src="{{ .Destination }}" alt="{{ .Text }}" />
</a>
{{ else }}
<img src="../{{ .Destination }}" alt="{{ .Text }}" />
{{ end }}

0 comments on commit 27b8c9e

Please sign in to comment.