add more link tag usage examples

This commit is contained in:
Frank Taillandier 2016-08-04 10:55:53 +02:00
parent d5e96757a5
commit 50854d2f76
1 changed files with 9 additions and 2 deletions

View File

@ -460,12 +460,16 @@ numbers from the highlighted code.
### Link
If you would like to include a link to a collection's document or to a post, the `link` tag will generate the correct permalink URL for the path you specify. You must include the file extension when using the `link` tag.
If you would like to include a link to a collection's document, a post, a page or a file the `link` tag will generate the correct permalink URL for the path you specify.
You must include the file extension when using the `link` tag.
{% highlight liquid %}
{% raw %}
{% link _collection/name-of-document.md %}
{% link _posts/2016-07-26-name-of-post.md %}
{% link news/index.html %}
{% link /assets/files/doc.pdf %}
{% endraw %}
{% endhighlight %}
@ -473,7 +477,10 @@ You can also use this tag to create a link in Markdown as follows:
{% highlight liquid %}
{% raw %}
[Name of Link]({% link _collection/name-of-document.md %})
[Link to a document]({% link _collection/name-of-document.md %})
[Link to a post]({% link _posts/2016-07-26-name-of-post.md %})
[Link to a page]({% link news/index.html %})
[Link to a file]({% link /assets/files/doc.pdf %})
{% endraw %}
{% endhighlight %}