Debian Codegraph @

docs/content/en/methods/resource/Permalink.md

raw
1 ---
2 title: Permalink
3 description: Returns the permalink of the given resource, publishing it in the process.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 returnType: string
9 signatures: [RESOURCE.Permalink]
10 ---
11
12 {{% include "/_common/methods/resource/global-page-remote-resources.md" %}}
13
14 The `Permalink` method on a `Resource` object writes the resource to the publish directory, typically `public`, and returns its [permalink](g).
15
16 ```go-html-template
17 {{ with resources.Get "images/a.jpg" }}
18 {{ .Permalink }} → https://example.org/images/a.jpg
19 {{ end }}
20 ```