RelPermalink
Returns the relative permalink of the given resource, publishing it in the process.
- Syntax
- RESOURCE.RelPermalink
- Returns
- string
Use this method with global resources, page resources, or remote resources.
The RelPermalink method on a Resource object writes the resource to the public directory and returns its relative permalink.
{{ with resources.Get "images/a.jpg" }}
{{ .RelPermalink }} → /images/a.jpg
{{ end }}Last updated:
October 2, 2026
:
content: Refer to directories by their component or default names (b6efb06e8)
Improve this page