Link to a page by path.

This will raise an error if the file is missing. In Jekyll 4, this is also relative URL so you don’t need to prepend base URL.

Note no quotes or colon.

{% link foo.md %}

{% link foo/bar.md %}
<img src="{% link assets/img/foo bar.jpg %}" />

Use a variable instead.

It works at least for include tag. Based on Jekyll’s own tests.

{% include {{ page.abc }} %}

{% include {{ page.abc | append: '.html' }} %} 

{% include {{ page.abc }}.html a='b' def=1 %}