Relref
The relref
shortcode returns the relative permalink of the given page reference.
Example usage:
[Post 1]({{% relref "/posts/post-1" %}})
[Post 1]({{% relref "/posts/post-1.md" %}})
[Post 1]({{% relref "/posts/post-1#foo" %}})
[Post 1]({{% relref "/posts/post-1.md#foo" %}})
Rendered:
<a href="/posts/post-1/">Post 1</a>
<a href="/posts/post-1/">Post 1</a>
<a href="/posts/post-1/#foo">Post 1</a>
<a href="/posts/post-1/#foo">Post 1</a>