Computing permalink URLs to non-article files

Hi, I have this structure:


I want to show a permalink to foo.yaml from, such as

I’m looking for a shortcode like ref and relref that can generate a permalink URL. (It looks like ref/relref only works with content pages and not files.)

I don’t think there is any built-in shortcode for what you need, but you should check out Page Resources.
You’ll find it makes it very easy to get the .Permalink of a resource from the page’s template or from within a custom shortcode.

But {{.Permalink}} is not available to the content page?