Back to Hugo

resources.Copy

docs/content/en/functions/resources/Copy.md

0.163.3412 B
Original Source
go-html-template
{{ with resources.Get "images/a.jpg" }}
  {{ with resources.Copy "img/new-image-name.jpg" . }}
    
  {{ end }}
{{ end }}

The TARGETPATH is relative to the server root. A leading slash is optional and has no effect.

[!NOTE] Use the resources.Copy function with global, page, and remote resources.