Cross-reference to a node page

I’m trying to link to a node page (I think that’s what it’s called) like http://mysite.com/dir/ where dir is a directory containing markdown files.

I’ve tried a number of options (this is in dir/demo.md, though the behavior is repeatable elsewhere):

{{< relref "/" >}} # link to the homepage?

{{< relref "dir" >}} # link to the dir directory

{{< relref "dir/" >}} # link to the dir directory

{{< relref "dir/demo.md" >}}

The first three trigger errors:

ERROR: 2015/07/26 No page found with path or logical name "/".
ERROR: 2015/07/26 No page found with path or logical name "dir".
ERROR: 2015/07/26 No page found with path or logical name "dir/".

Is there any way to refer to node pages by their relative path? I see examples that use {{ .Site.BaseURL }} to link to the homepage, but that makes an absolute URL, which I don’t want.

In templates you can do

{{ relURL "/" }} 

And so on.

See

Awesome, thanks! I guess I’ll have to make shortcodes for those functions to use them inside posts.