How can I link from my post to the file myasset.xml without giving the full URL such as [download](/2016/06/22/myasset.xml) - which would be bad if I decide to move the post.
I have tried to use {{ .Dir }} on my .md page, but this is not replaced by anything. The output contains the characters {{ .Dir }}. Perhaps I have done something wrong?
That is template syntax, it doesn’t work directly in content files. If you’re gonna use it outside of the template files, you’ll need to wrap it in a shortcode.