This is the crucial piece of information (emphasis mine):
relURL
returns a path relative to the protocol+host portion of thebaseURL
specified in config.toml.
The docs on relURL
read (emphasis, again, mine):
Given a string, prepends the relative URL according to a page’s position in the project directory structure.
This makes me expect {{< relurl "../index.html" >}}
to return /foo/index.html
when invoked from e.g. /foo/bar/doc.md
.