Ref

Ref


Insert a permalink to the given page reference using the ref shortcode.

The ref shortcode returns the permalink of the given page reference.

Example usage:

[Post 1]({{% ref "/posts/post-1" %}})
[Post 1]({{% ref "/posts/post-1.md" %}})
[Post 1]({{% ref "/posts/post-1#foo" %}})
[Post 1]({{% ref "/posts/post-1.md#foo" %}})

Rendered:

<a href="https://example.org/posts/post-1/">Post 1</a>
<a href="https://example.org/posts/post-1/">Post 1</a>
<a href="https://example.org/posts/post-1/#foo">Post 1</a>
<a href="https://example.org/posts/post-1/#foo">Post 1</a>