From bf8c15f9490d889a69af2dd952240bfb703e7cf4 Mon Sep 17 00:00:00 2001 From: DirtyF Date: Tue, 2 Aug 2016 09:28:36 +0200 Subject: [PATCH] [docs] Document link Liquid tag --- site/_docs/templates.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 19f1ca7c..a6c9f639 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -488,6 +488,24 @@ You can also use this tag to create a link to a post in Markdown as follows: {% endraw %} {% endhighlight %} +### Link + +If you would like to include a link to a collection's document, the `link` tag will generate the correct permalink URL for the document path you specify. You must include the file extension when using the `link` tag. + +{% highlight liquid %} +{% raw %} +{% link _collection/name-of-document.md %} +{% endraw %} +{% endhighlight %} + +You can also use this tag to create a link to a collection's document in Markdown as follows: + +{% highlight liquid %} +{% raw %} +[Name of Link]({% link _collection/name-of-document.md %}) +{% endraw %} +{% endhighlight %} + ### Gist Use the `gist` tag to easily embed a GitHub Gist onto your site. This works