From 50854d2f76e77f93939c887ed5e7521390e0df9b Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 4 Aug 2016 10:55:53 +0200 Subject: [PATCH] add more link tag usage examples --- site/_docs/templates.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 18bf3abd..087ca940 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -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 %}