Back to Hugo

RelPermalink

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

0.161.1344 B
Original Source

{{% include "/_common/methods/resource/global-page-remote-resources.md" %}}

The Permalink method on a Resource object writes the resource to the publish directory, typically public, and returns its relative permalink.

go-html-template
{{ with resources.Get "images/a.jpg" }}
  {{ .RelPermalink }} → /images/a.jpg
{{ end }}