From fcef78c4b68a6b4609dabb00ef0ad2c4c1d5d2b3 Mon Sep 17 00:00:00 2001 From: Parker Moore Date: Sun, 7 Aug 2016 11:54:32 -0700 Subject: [PATCH 1/2] Revert "templates.md: {% link %} tag only accepts collection documents" This reverts commit ab4abb19332c71307a3e052746e65ff62d305b38. --- site/_docs/templates.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index 48d7cd74..f95f2ca5 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -510,9 +510,7 @@ numbers from the highlighted code. ### Link -If you would like to include a link to a collection's document, or a post -the `link` tag will generate the correct permalink URL for the path you -specify. +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. @@ -520,6 +518,8 @@ You must include the file extension when using the `link` tag. {% 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 %} ``` @@ -529,12 +529,11 @@ You can also use this tag to create a link in Markdown as follows: {% raw %} [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 %} ``` -Support for static files and pages is coming in a later release but is -**not** released as of v3.2.1. - ### Post URL If you would like to include a link to a post on your site, the `post_url` tag From c61752a336d21de4ccae10266aae23306423d974 Mon Sep 17 00:00:00 2001 From: Frank Taillandier Date: Thu, 6 Oct 2016 01:17:26 +0200 Subject: [PATCH 2/2] Fix line length --- site/_docs/templates.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/site/_docs/templates.md b/site/_docs/templates.md index f95f2ca5..54f914f7 100644 --- a/site/_docs/templates.md +++ b/site/_docs/templates.md @@ -510,7 +510,9 @@ numbers from the highlighted code. ### Link -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. +If you want 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.