Copy.md - hugo - [fork] hugo port for 9front
 (HTM) git clone https://git.drkhsh.at/hugo.git
 (DIR) Log
 (DIR) Files
 (DIR) Refs
 (DIR) Submodules
 (DIR) README
 (DIR) LICENSE
       ---
       Copy.md (651B)
       ---
            1 ---
            2 title: resources.Copy
            3 description: Copies the given resource to the target path.
            4 categories: []
            5 params:
            6   functions_and_methods:
            7     aliases: []
            8     returnType: resource.Resource
            9     signatures: [resources.Copy TARGETPATH RESOURCE]
           10 ---
           11 
           12 ```go-html-template
           13 {{ with resources.Get "images/a.jpg" }}
           14   {{ with resources.Copy "img/new-image-name.jpg" . }}
           15     <img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
           16   {{ end }}
           17 {{ end }}
           18 ```
           19 
           20 The relative URL of the new published resource will be:
           21 
           22 ```text
           23 /img/new-image-name.jpg
           24 ```
           25 
           26 > [!note]
           27 > Use the `resources.Copy` function with global, page, and remote resources.